My Collection


Table Of Contents
Chapter 1
DbCommandBuilder Class (System.Data.Common)
CodeAccessPermission Class (System.Security)
DbConnection Class (System.Data.Common)
DbConnectionStringBuilder Class (System.Data.Common)
DbProviderFactory Class (System.Data.Common)
DbDataAdapter Class (System.Data.Common)
DbCommandDefinition Class
DbException Class
DbProviderManifest Class
DbProviderServices Class
DbTransaction Class


Chapter 1
Export (0) Print
Expand All

DbCommandBuilder Class

 

Automatically generates single-table commands used to reconcile changes made to a DataSet with the associated database. This is an abstract class that can only be inherited.

Namespace:   System.Data.Common
Assembly:  System.Data (in System.Data.dll)

System.Object
  System.MarshalByRefObject
    System.ComponentModel.Component
      System.Data.Common.DbCommandBuilder
        System.Data.Odbc.OdbcCommandBuilder
        System.Data.OleDb.OleDbCommandBuilder
        System.Data.OracleClient.OracleCommandBuilder
        System.Data.SqlClient.SqlCommandBuilder

C#
public abstract class DbCommandBuilder : Component

NameDescription
System_CAPS_protmethodDbCommandBuilder()

Initializes a new instance of a class that inherits from the DbCommandBuilder class.

NameDescription
System_CAPS_protpropertyCanRaiseEvents

Gets a value indicating whether the component can raise an event.(Inherited from Component.)

System_CAPS_pubpropertyCatalogLocation

Sets or gets the CatalogLocation for an instance of the DbCommandBuilder class.

System_CAPS_pubpropertyCatalogSeparator

Sets or gets a string used as the catalog separator for an instance of the DbCommandBuilder class.

System_CAPS_pubpropertyConflictOption

Specifies which ConflictOption is to be used by the DbCommandBuilder.

System_CAPS_pubpropertyContainer

Gets the IContainer that contains the Component.(Inherited from Component.)

System_CAPS_pubpropertyDataAdapter

Gets or sets a DbDataAdapter object for which Transact-SQL statements are automatically generated.

System_CAPS_protpropertyDesignMode

Gets a value that indicates whether the Component is currently in design mode.(Inherited from Component.)

System_CAPS_protpropertyEvents

Gets the list of event handlers that are attached to this Component.(Inherited from Component.)

System_CAPS_pubpropertyQuotePrefix

Gets or sets the beginning character or characters to use when specifying database objects (for example, tables or columns) whose names contain characters such as spaces or reserved tokens.

System_CAPS_pubpropertyQuoteSuffix

Gets or sets the ending character or characters to use when specifying database objects (for example, tables or columns) whose names contain characters such as spaces or reserved tokens.

System_CAPS_pubpropertySchemaSeparator

Gets or sets the character to be used for the separator between the schema identifier and any other identifiers.

System_CAPS_pubpropertySetAllValues

Specifies whether all column values in an update statement are included or only changed ones.

System_CAPS_pubpropertySite

Gets or sets the ISite of the Component.(Inherited from Component.)

NameDescription
System_CAPS_protmethodApplyParameterInfo(DbParameter, DataRow, StatementType, Boolean)

Allows the provider implementation of the DbCommandBuilder class to handle additional parameter properties.

System_CAPS_pubmethodCreateObjRef(Type)

Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.(Inherited from MarshalByRefObject.)

System_CAPS_pubmethodDispose()

Releases all resources used by the Component.(Inherited from Component.)

System_CAPS_protmethodDispose(Boolean)

Releases the unmanaged resources used by the DbCommandBuilder and optionally releases the managed resources.(Overrides Component.Dispose(Boolean).)

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Releases unmanaged resources and performs other cleanup operations before the Component is reclaimed by garbage collection.(Inherited from Component.)

System_CAPS_pubmethodGetDeleteCommand()

Gets the automatically generated DbCommand object required to perform deletions at the data source.

System_CAPS_pubmethodGetDeleteCommand(Boolean)

Gets the automatically generated DbCommand object required to perform deletions at the data source, optionally using columns for parameter names.

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetInsertCommand()

Gets the automatically generated DbCommand object required to perform insertions at the data source.

System_CAPS_pubmethodGetInsertCommand(Boolean)

Gets the automatically generated DbCommand object required to perform insertions at the data source, optionally using columns for parameter names.

System_CAPS_pubmethodGetLifetimeService()

Retrieves the current lifetime service object that controls the lifetime policy for this instance.(Inherited from MarshalByRefObject.)

System_CAPS_protmethodGetParameterName(Int32)

Returns the name of the specified parameter in the format of @p#. Use when building a custom command builder.

System_CAPS_protmethod GetParameterName(String)

This API supports the product infrastructure and is not intended to be used directly from your code. Returns the full parameter name, given the partial parameter name.

System_CAPS_protmethod GetParameterPlaceholder(Int32)

This API supports the product infrastructure and is not intended to be used directly from your code. Returns the placeholder for the parameter in the associated SQL statement.

System_CAPS_protmethodGetSchemaTable(DbCommand)

Returns the schema table for the DbCommandBuilder.

System_CAPS_protmethodGetService(Type)

Returns an object that represents a service provided by the Component or by its Container.(Inherited from Component.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodGetUpdateCommand()

Gets the automatically generated DbCommand object required to perform updates at the data source.

System_CAPS_pubmethodGetUpdateCommand(Boolean)

Gets the automatically generated DbCommand object required to perform updates at the data source, optionally using columns for parameter names.

System_CAPS_protmethodInitializeCommand(DbCommand)

Resets the CommandTimeout, Transaction, CommandType, and UpdateRowSource properties on the DbCommand.

System_CAPS_pubmethodInitializeLifetimeService()

Obtains a lifetime service object to control the lifetime policy for this instance.(Inherited from MarshalByRefObject.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone(Boolean)

Creates a shallow copy of the current MarshalByRefObject object.(Inherited from MarshalByRefObject.)

System_CAPS_pubmethodQuoteIdentifier(String)

Given an unquoted identifier in the correct catalog case, returns the correct quoted form of that identifier, including properly escaping any embedded quotes in the identifier.

System_CAPS_pubmethodRefreshSchema()

Clears the commands associated with this DbCommandBuilder.

System_CAPS_protmethodRowUpdatingHandler(RowUpdatingEventArgs)

Adds an event handler for the RowUpdating event.

System_CAPS_protmethodSetRowUpdatingHandler(DbDataAdapter)

Registers the DbCommandBuilder to handle the RowUpdating event for a DbDataAdapter.

System_CAPS_pubmethodToString()

Returns a String containing the name of the Component, if any. This method should not be overridden.(Inherited from Component.)

System_CAPS_pubmethodUnquoteIdentifier(String)

Given a quoted identifier, returns the correct unquoted form of that identifier, including properly un-escaping any embedded quotes in the identifier.

NameDescription
System_CAPS_pubeventDisposed

Occurs when the component is disposed by a call to the Dispose method. (Inherited from Component.)

The DbCommandBuilder class is provided for the convenience of provider writers creating their own command builders. By inheriting from this class, developers can implement provider specific behavior in their own code.

The DbDataAdapter does not automatically generate the SQL statements required to reconcile changes made to a DataSet with the associated data source. However, you can create a DbCommandBuilder object to automatically generate SQL statements for single-table updates if you set the SelectCommand property of the DbDataAdapter. Then, any additional SQL statements that you do not set are generated by the DbCommandBuilder.

The DbCommandBuilder registers itself as a listener for RowUpdating events whenever you set the DataAdapter property. You can only associate one DbDataAdapter or DbCommandBuilder object with each other at one time.

To generate INSERT, UPDATE, or DELETE statements, the DbCommandBuilder uses the SelectCommand property to retrieve a required set of metadata automatically. If you change the SelectCommand after the metadata has been retrieved (for example, after the first update), you should call the RefreshSchema method to update the metadata.

The SelectCommand must also return at least one primary key or unique column. If none exist, an InvalidOperationException exception is generated, and the commands are not generated.

The DbCommandBuilder also uses the Connection, CommandTimeout, and Transaction properties referenced by the SelectCommand. The user should call RefreshSchema if any of these properties are modified, or if the SelectCommand itself is replaced. Otherwise the InsertCommand, UpdateCommand, and DeleteCommand properties retain their previous values.

If you call Dispose, the DbCommandBuilder is disassociated from the DbDataAdapter, and the generated commands are no longer used.

.NET Framework
Available since 2.0

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
© 2016 Microsoft
Export (0) Print
Expand All

CodeAccessPermission Class

 

Defines the underlying structure of all code access permissions.

Namespace:   System.Security
Assembly:  mscorlib (in mscorlib.dll)

System.Object
  System.Security.CodeAccessPermission
    System.Configuration.ConfigurationPermission
    System.Data.Common.DBDataPermission
    System.Data.OracleClient.OraclePermission
    System.Drawing.Printing.PrintingPermission
    System.Messaging.MessageQueuePermission
    System.Net.DnsPermission
    System.Net.Mail.SmtpPermission
    System.Net.NetworkInformation.NetworkInformationPermission
    System.Net.PeerToPeer.Collaboration.PeerCollaborationPermission
    System.Net.PeerToPeer.PnrpPermission
    System.Net.SocketPermission
    System.Net.WebPermission
    System.Security.Permissions.DataProtectionPermission
    System.Security.Permissions.EnvironmentPermission
    System.Security.Permissions.FileDialogPermission
    System.Security.Permissions.FileIOPermission
    System.Security.Permissions.GacIdentityPermission
    System.Security.Permissions.IsolatedStoragePermission
    System.Security.Permissions.KeyContainerPermission
    System.Security.Permissions.MediaPermission
    System.Security.Permissions.PublisherIdentityPermission
    System.Security.Permissions.ReflectionPermission
    System.Security.Permissions.RegistryPermission
    System.Security.Permissions.ResourcePermissionBase
    System.Security.Permissions.SecurityPermission
    System.Security.Permissions.SiteIdentityPermission
    System.Security.Permissions.StorePermission
    System.Security.Permissions.StrongNameIdentityPermission
    System.Security.Permissions.TypeDescriptorPermission
    System.Security.Permissions.UIPermission
    System.Security.Permissions.UrlIdentityPermission
    System.Security.Permissions.WebBrowserPermission
    System.Security.Permissions.ZoneIdentityPermission
    System.Transactions.DistributedTransactionPermission
    System.Web.AspNetHostingPermission
    System.Xaml.Permissions.XamlLoadPermission

C#
[SerializableAttribute]
[ComVisibleAttribute(true)]
[SecurityPermissionAttribute(SecurityAction.InheritanceDemand, 
	ControlEvidence = true, ControlPolicy = true)]
public abstract class CodeAccessPermission : IPermission, ISecurityEncodable, 
	IStackWalk

NameDescription
System_CAPS_protmethodCodeAccessPermission()

Initializes a new instance of the CodeAccessPermission class.

NameDescription
System_CAPS_pubmethodAssert()

Declares that the calling code can access the resource protected by a permission demand through the code that calls this method, even if callers higher in the stack have not been granted permission to access the resource. Using Assert can create security issues.

System_CAPS_pubmethodCopy()

When implemented by a derived class, creates and returns an identical copy of the current permission object.

System_CAPS_pubmethodDemand()

Forces a SecurityException at run time if all callers higher in the call stack have not been granted the permission specified by the current instance.

System_CAPS_pubmethodDeny()

Obsolete.Prevents callers higher in the call stack from using the code that calls this method to access the resource specified by the current instance.

System_CAPS_pubmethodEquals(Object)

Determines whether the specified CodeAccessPermission object is equal to the current CodeAccessPermission.(Overrides Object.Equals(Object).)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodFromXml(SecurityElement)

When overridden in a derived class, reconstructs a security object with a specified state from an XML encoding.

System_CAPS_pubmethodGetHashCode()

Gets a hash code for the CodeAccessPermission object that is suitable for use in hashing algorithms and data structures such as a hash table.(Overrides Object.GetHashCode().)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodIntersect(IPermission)

When implemented by a derived class, creates and returns a permission that is the intersection of the current permission and the specified permission.

System_CAPS_pubmethodIsSubsetOf(IPermission)

When implemented by a derived class, determines whether the current permission is a subset of the specified permission.

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodPermitOnly()

Prevents callers higher in the call stack from using the code that calls this method to access all resources except for the resource specified by the current instance.

System_CAPS_pubmethodSystem_CAPS_staticRevertAll()

Causes all previous overrides for the current frame to be removed and no longer in effect.

System_CAPS_pubmethodSystem_CAPS_staticRevertAssert()

Causes any previous Assert for the current frame to be removed and no longer in effect.

System_CAPS_pubmethodSystem_CAPS_staticRevertDeny()

Obsolete.Causes any previous Deny for the current frame to be removed and no longer in effect.

System_CAPS_pubmethodSystem_CAPS_staticRevertPermitOnly()

Causes any previous PermitOnly for the current frame to be removed and no longer in effect.

System_CAPS_pubmethodToString()

Creates and returns a string representation of the current permission object.(Overrides Object.ToString().)

System_CAPS_pubmethodToXml()

When overridden in a derived class, creates an XML encoding of the security object and its current state.

System_CAPS_pubmethodUnion(IPermission)

When overridden in a derived class, creates a permission that is the union of the current permission and the specified permission.

Code access permissions use a stack walk to ensure that all callers of the code have been granted a permission. If a permission object is null, it is handled the same as a permission object with the state PermissionState.None.

The call stack is typically represented as growing down, so that methods higher in the call stack call methods lower in the call stack.

Inheritors of the CodeAccessPermission class must be granted full trust to function correctly as permissions extending the security infrastructure. To determine that the inheritors are fully trusted, CodeAccessPermission issues an InheritanceDemand for ControlEvidence = true and ControlPolicy = true.

Notes to Inheritors:

When you inherit from CodeAccessPermission, you must also implement the IUnrestrictedPermission interface.

The following CodeAccessPermission members must be overridden: Copy, Intersect, IsSubsetOf, ToXml, FromXml, and Union.

You must also define a constructor that takes a PermissionState as its only parameter.

You must apply the SerializableAttribute attribute to a class that inherits from CodeAccessPermission.

The following code example shows a permission derived from the CodeAccessPermission class.

C#
//#define debug
// This custom permission is intended only for the purposes of illustration.
// The following code shows how to create a custom permission that inherits
// from CodeAccessPermission. The code implements all required overrides.
// A wildcard character ('*') is implemented for the Name property.
using System;
using System.Security;
using System.Security.Permissions;
using System.IO;
using System.Security.Policy;
using System.Collections;
using System.Text;
[assembly:System.Reflection.AssemblyKeyFile("Key.snk")]
[assembly:System.Security.AllowPartiallyTrustedCallersAttribute()]
namespace MyPermission
{
    [Serializable()] sealed public class   NameIdPermission : CodeAccessPermission, IUnrestrictedPermission
    {
                                                                        private String m_Name;
                                                                        private bool m_Unrestricted;
                                                                        public  NameIdPermission(String name)
        {
            m_Name = name;
        }
                                                                        public  NameIdPermission(PermissionState state)
        {
                                                                        if (state == PermissionState.None)
            {
                m_Name = "";
            }
                                                                        else
                                                                        if (state == PermissionState.Unrestricted)
            {
                                                                        throw new ArgumentException("Unrestricted state is not allowed for identity permissions.");
            }
                                                                        else throw new ArgumentException("Invalid permission state.");
        }
                                                                        public String Name
        {
                                                                        set{m_Name = value;}
                                                                        get{ return m_Name;}
        }
                                                                        public override IPermission Copy()
        {
                                                                        string name = m_Name;
                                                                        return new  NameIdPermission( name );
        }
                                                                        public bool IsUnrestricted()
        {
                                                                        // Always false, unrestricted state is not allowed.
                                                                        return m_Unrestricted;
        }
                                                                        private bool VerifyType(IPermission target)
        {
                                                                        return (target is  NameIdPermission);
        }
                                                                        public override bool IsSubsetOf(IPermission target)
        {
#if(debug)
            Console.WriteLine ("************* Entering IsSubsetOf *********************");
#endif
                                                                        if (target == null)
            {
                Console.WriteLine ("IsSubsetOf: target == null");
                                                                        return false;
            }
#if(debug)
            Console.WriteLine ("This is = " + (( NameIdPermission)this).Name);
            Console.WriteLine ("Target is " + (( NameIdPermission)target).m_Name);
#endif
                                                                        try
            {
                 NameIdPermission operand = ( NameIdPermission)target;
                                                                        // The following check for unrestricted permission is only included as an example for
                                                                        // permissions that allow the unrestricted state. It is of no value for this permission.
                                                                        if (true == operand.m_Unrestricted)
                {
                                                                        return true;
                }
                                                                        else if (true == this.m_Unrestricted)
                {
                                                                        return false;
                }
                                                                        if (this.m_Name != null)
                {
                                                                        if (operand.m_Name == null) return false;
                                                                        if (this.m_Name == "") return true;
                }
                                                                        if (this.m_Name.Equals (operand.m_Name)) return true;
                                                                        else
                {
                                                                        // Check for wild card character '*'.
                                                                        int i = operand.m_Name.LastIndexOf ("*");
                                                                        if (i > 0)
                    {
                                                                        string prefix = operand.m_Name.Substring (0, i);
                                                                        if (this.m_Name.StartsWith (prefix))
                        {
                                                                        return true;
                        }
                    }
                }
                                                                        return false;
            }
                                                                        catch (InvalidCastException)
            {
                                                                        throw new ArgumentException (String.Format ("Argument_WrongType", this.GetType ().FullName));
            }
        }
                                                                        public override IPermission Intersect(IPermission target)
        {
            Console.WriteLine ("************* Entering Intersect *********************");
                                                                        if (target == null)
            {
                                                                        return null;
            }
#if(debug)
            Console.WriteLine ("This is = " + (( NameIdPermission)this).Name);
            Console.WriteLine ("Target is " + (( NameIdPermission)target).m_Name);
#endif
                                                                        if (!VerifyType(target))
            {
                                                                        throw new ArgumentException (String.Format ("Argument is wrong type.", this.GetType ().FullName));
            }
             NameIdPermission operand = ( NameIdPermission)target;
                                                                        if (operand.IsSubsetOf (this)) return operand.Copy ();
                                                                        else if (this.IsSubsetOf (operand)) return this.Copy ();
                                                                        else
                                                                        return null;
        }
                                                                        public override IPermission Union(IPermission target)
        {
#if(debug)
            Console.WriteLine ("************* Entering Union *********************");
#endif
                                                                        if (target == null)
            {
                                                                        return this;
            }
#if(debug)
            Console.WriteLine ("This is = " + (( NameIdPermission)this).Name);
            Console.WriteLine ("Target is " + (( NameIdPermission)target).m_Name);
#endif
                                                                        if (!VerifyType(target))
            {
                                                                        throw new ArgumentException (String.Format ("Argument_WrongType", this.GetType ().FullName));
            }
             NameIdPermission operand = ( NameIdPermission)target;
                                                                        if (operand.IsSubsetOf (this)) return this.Copy ();
                                                                        else if (this.IsSubsetOf (operand)) return operand.Copy ();
                                                                        else
                                                                        return null;
        }
                                                                        public override void FromXml(SecurityElement e)
        {
                                                                        // The following code for unrestricted permission is only included as an example for
                                                                        // permissions that allow the unrestricted state. It is of no value for this permission.
            String elUnrestricted = e.Attribute("Unrestricted");
                                                                        if (null != elUnrestricted)
            {
                m_Unrestricted = bool.Parse(elUnrestricted);
                                                                        return;
            }
            String elName = e.Attribute( "Name" );
            m_Name = elName == null ? null : elName;
        }
                                                                        public override SecurityElement ToXml()
        {
                                                                        // Use the SecurityElement class to encode the permission to XML.
            SecurityElement esd = new SecurityElement("IPermission");
            String name = typeof( NameIdPermission).AssemblyQualifiedName;
            esd.AddAttribute("class", name);
            esd.AddAttribute("version", "1.0");
                                                                        // The following code for unrestricted permission is only included as an example for
                                                                        // permissions that allow the unrestricted state. It is of no value for this permission.
                                                                        if (m_Unrestricted)
            {
                esd.AddAttribute("Unrestricted", true.ToString());
            }
                                                                        if (m_Name != null) esd.AddAttribute( "Name", m_Name );
                                                                        return esd;
        }
     }
}

InheritanceDemand

for the ability of inheritors to provide evidence and view and modify policy. Associated enumerations: SecurityPermissionFlag.ControlEvidence, SecurityPermissionFlag.ControlPolicy.

.NET Framework
Available since 1.1

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbConnection Class

 

Represents a connection to a database.

Namespace:   System.Data.Common
Assembly:  System.Data (in System.Data.dll)

System.Object
  System.MarshalByRefObject
    System.ComponentModel.Component
      System.Data.Common.DbConnection
        System.Data.EntityClient.EntityConnection
        System.Data.Odbc.OdbcConnection
        System.Data.OleDb.OleDbConnection
        System.Data.OracleClient.OracleConnection
        System.Data.SqlClient.SqlConnection

C#
public abstract class DbConnection : Component, IDbConnection, 
	IDisposable

NameDescription
System_CAPS_protmethodDbConnection()

Initializes a new instance of the DbConnection class.

NameDescription
System_CAPS_protpropertyCanRaiseEvents

Gets a value indicating whether the component can raise an event.(Inherited from Component.)

System_CAPS_pubpropertyConnectionString

Gets or sets the string used to open the connection.

System_CAPS_pubpropertyConnectionTimeout

Gets the time to wait while establishing a connection before terminating the attempt and generating an error.

System_CAPS_pubpropertyContainer

Gets the IContainer that contains the Component.(Inherited from Component.)

System_CAPS_pubpropertyDatabase

Gets the name of the current database after a connection is opened, or the database name specified in the connection string before the connection is opened.

System_CAPS_pubpropertyDataSource

Gets the name of the database server to which to connect.

System_CAPS_protpropertyDbProviderFactory

Gets the DbProviderFactory for this DbConnection.

System_CAPS_protpropertyDesignMode

Gets a value that indicates whether the Component is currently in design mode.(Inherited from Component.)

System_CAPS_protpropertyEvents

Gets the list of event handlers that are attached to this Component.(Inherited from Component.)

System_CAPS_pubpropertyServerVersion

Gets a string that represents the version of the server to which the object is connected.

System_CAPS_pubpropertySite

Gets or sets the ISite of the Component.(Inherited from Component.)

System_CAPS_pubpropertyState

Gets a string that describes the state of the connection.

NameDescription
System_CAPS_protmethodBeginDbTransaction(IsolationLevel)

Starts a database transaction.

System_CAPS_pubmethodBeginTransaction()

Starts a database transaction.

System_CAPS_pubmethodBeginTransaction(IsolationLevel)

Starts a database transaction with the specified isolation level.

System_CAPS_pubmethodChangeDatabase(String)

Changes the current database for an open connection.

System_CAPS_pubmethodClose()

Closes the connection to the database. This is the preferred method of closing any open connection.

System_CAPS_pubmethodCreateCommand()

Creates and returns a DbCommand object associated with the current connection.

System_CAPS_protmethodCreateDbCommand()

Creates and returns a DbCommand object associated with the current connection.

System_CAPS_pubmethodCreateObjRef(Type)

Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.(Inherited from MarshalByRefObject.)

System_CAPS_pubmethodDispose()

Releases all resources used by the Component.(Inherited from Component.)

System_CAPS_protmethodDispose(Boolean)

Releases the unmanaged resources used by the Component and optionally releases the managed resources.(Inherited from Component.)

System_CAPS_pubmethodEnlistTransaction(Transaction)

Enlists in the specified transaction.

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Releases unmanaged resources and performs other cleanup operations before the Component is reclaimed by garbage collection.(Inherited from Component.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetLifetimeService()

Retrieves the current lifetime service object that controls the lifetime policy for this instance.(Inherited from MarshalByRefObject.)

System_CAPS_pubmethodGetSchema()

Returns schema information for the data source of this DbConnection.

System_CAPS_pubmethodGetSchema(String)

Returns schema information for the data source of this DbConnection using the specified string for the schema name.

System_CAPS_pubmethodGetSchema(String, String[])

Returns schema information for the data source of this DbConnection using the specified string for the schema name and the specified string array for the restriction values.

System_CAPS_protmethodGetService(Type)

Returns an object that represents a service provided by the Component or by its Container.(Inherited from Component.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodInitializeLifetimeService()

Obtains a lifetime service object to control the lifetime policy for this instance.(Inherited from MarshalByRefObject.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone(Boolean)

Creates a shallow copy of the current MarshalByRefObject object.(Inherited from MarshalByRefObject.)

System_CAPS_protmethodOnStateChange(StateChangeEventArgs)

Raises the StateChange event.

System_CAPS_pubmethodOpen()

Opens a database connection with the settings specified by the ConnectionString.

System_CAPS_pubmethodOpenAsync()

An asynchronous version of Open, which opens a database connection with the settings specified by the ConnectionString. This method invokes the virtual method OpenAsync with CancellationToken.None.

System_CAPS_pubmethodOpenAsync(CancellationToken)

This is the asynchronous version of Open. Providers should override with an appropriate implementation. The cancellation token can optionally be honored.

The default implementation invokes the synchronous Open call and returns a completed task. The default implementation will return a cancelled task if passed an already cancelled cancellationToken. Exceptions thrown by Open will be communicated via the returned Task Exception property.

Do not invoke other methods and properties of the DbConnection object until the returned Task is complete.

System_CAPS_pubmethodToString()

Returns a String containing the name of the Component, if any. This method should not be overridden.(Inherited from Component.)

NameDescription
System_CAPS_pubeventDisposed

Occurs when the component is disposed by a call to the Dispose method. (Inherited from Component.)

System_CAPS_pubeventStateChange

Occurs when the state of the event changes.

NameDescription
System_CAPS_pubinterfaceSystem_CAPS_privmethodIDbConnection.BeginTransaction()

Begins a database transaction.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIDbConnection.BeginTransaction(IsolationLevel)

Begins a database transaction with the specified IsolationLevel value.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIDbConnection.CreateCommand()

Creates and returns a DbCommand object that is associated with the current connection.

Notes to Inheritors:

When you inherit from DbConnection, you must override the following members: Close, BeginDbTransaction, ChangeDatabase, CreateDbCommand, Open, and StateChange. You must also provide the following properties: ConnectionString, Database, DataSource, ServerVersion, and State.

Universal Windows Platform
Available since 10
.NET Framework
Available since 2.0

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbConnectionStringBuilder Class

 

Provides a base class for strongly typed connection string builders.

Namespace:   System.Data.Common
Assembly:  System.Data (in System.Data.dll)


C#
public class DbConnectionStringBuilder : IDictionary, ICollection, 
	IEnumerable, ICustomTypeDescriptor

NameDescription
System_CAPS_pubmethodDbConnectionStringBuilder()

Initializes a new instance of the DbConnectionStringBuilder class.

System_CAPS_pubmethodDbConnectionStringBuilder(Boolean)

Initializes a new instance of the DbConnectionStringBuilder class, optionally using ODBC rules for quoting values.

NameDescription
System_CAPS_pubpropertyBrowsableConnectionString

Gets or sets a value that indicates whether the ConnectionString property is visible in Visual Studio designers.

System_CAPS_pubpropertyConnectionString

Gets or sets the connection string associated with the DbConnectionStringBuilder.

System_CAPS_pubpropertyCount

Gets the current number of keys that are contained within the ConnectionString property.

System_CAPS_pubpropertyIsFixedSize

Gets a value that indicates whether the DbConnectionStringBuilder has a fixed size.

System_CAPS_pubpropertyIsReadOnly

Gets a value that indicates whether the DbConnectionStringBuilder is read-only.

System_CAPS_pubpropertyItem[String]

Gets or sets the value associated with the specified key.

System_CAPS_pubpropertyKeys

Gets an ICollection that contains the keys in the DbConnectionStringBuilder.

System_CAPS_pubpropertyValues

Gets an ICollection that contains the values in the DbConnectionStringBuilder.

NameDescription
System_CAPS_pubmethodAdd(String, Object)

Adds an entry with the specified key and value into the DbConnectionStringBuilder.

System_CAPS_pubmethodSystem_CAPS_staticAppendKeyValuePair(StringBuilder, String, String)

Provides an efficient and safe way to append a key and value to an existing StringBuilder object.

System_CAPS_pubmethodSystem_CAPS_staticAppendKeyValuePair(StringBuilder, String, String, Boolean)

Provides an efficient and safe way to append a key and value to an existing StringBuilder object.

System_CAPS_pubmethodClear()

Clears the contents of the DbConnectionStringBuilder instance.

System_CAPS_protmethodClearPropertyDescriptors()

Clears the collection of PropertyDescriptor objects on the associated DbConnectionStringBuilder.

System_CAPS_pubmethodContainsKey(String)

Determines whether the DbConnectionStringBuilder contains a specific key.

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_pubmethodEquivalentTo(DbConnectionStringBuilder)

Compares the connection information in this DbConnectionStringBuilder object with the connection information in the supplied object.

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_protmethodGetProperties(Hashtable)

Fills a supplied Hashtable with information about all the properties of this DbConnectionStringBuilder.

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodRemove(String)

Removes the entry with the specified key from the DbConnectionStringBuilder instance.

System_CAPS_pubmethodShouldSerialize(String)

Indicates whether the specified key exists in this DbConnectionStringBuilder instance.

System_CAPS_pubmethodToString()

Returns the connection string associated with this DbConnectionStringBuilder.(Overrides Object.ToString().)

System_CAPS_pubmethodTryGetValue(String, Object)

Retrieves a value corresponding to the supplied key from this DbConnectionStringBuilder.

NameDescription
System_CAPS_pubinterfaceSystem_CAPS_privmethodICollection.CopyTo(Array, Int32)

Copies the elements of the ICollection to an Array, starting at a particular Array index.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIDictionary.Add(Object, Object)

Adds an element with the provided key and value to the IDictionary object.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIDictionary.Contains(Object)

Determines whether the IDictionary object contains an element with the specified key.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIDictionary.GetEnumerator()

Returns an IDictionaryEnumerator object for the IDictionary object.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIDictionary.Remove(Object)

Removes the element with the specified key from the IDictionary object.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIEnumerable.GetEnumerator()

Returns an enumerator that iterates through a collection.

System_CAPS_pubinterfaceSystem_CAPS_privmethodICustomTypeDescriptor.GetAttributes()

Returns a collection of custom attributes for this instance of a component.

System_CAPS_pubinterfaceSystem_CAPS_privmethodICustomTypeDescriptor.GetClassName()

Returns the class name of this instance of a component.

System_CAPS_pubinterfaceSystem_CAPS_privmethodICustomTypeDescriptor.GetComponentName()

Returns the name of this instance of a component.

System_CAPS_pubinterfaceSystem_CAPS_privmethodICustomTypeDescriptor.GetConverter()

Returns a type converter for this instance of a component.

System_CAPS_pubinterfaceSystem_CAPS_privmethodICustomTypeDescriptor.GetDefaultEvent()

Returns the default event for this instance of a component.

System_CAPS_pubinterfaceSystem_CAPS_privmethodICustomTypeDescriptor.GetDefaultProperty()

Returns the default property for this instance of a component.

System_CAPS_pubinterfaceSystem_CAPS_privmethodICustomTypeDescriptor.GetEditor(Type)

Returns an editor of the specified type for this instance of a component.

System_CAPS_pubinterfaceSystem_CAPS_privmethodICustomTypeDescriptor.GetEvents()

Returns the events for this instance of a component.

System_CAPS_pubinterfaceSystem_CAPS_privmethodICustomTypeDescriptor.GetEvents(Attribute[])

Returns the events for this instance of a component using the specified attribute array as a filter.

System_CAPS_pubinterfaceSystem_CAPS_privmethodICustomTypeDescriptor.GetProperties()

Returns the properties for this instance of a component.

System_CAPS_pubinterfaceSystem_CAPS_privmethodICustomTypeDescriptor.GetProperties(Attribute[])

Returns the properties for this instance of a component using the attribute array as a filter.

System_CAPS_pubinterfaceSystem_CAPS_privmethodICustomTypeDescriptor.GetPropertyOwner(PropertyDescriptor)

Returns an object that contains the property described by the specified property descriptor.

System_CAPS_pubinterfaceSystem_CAPS_privpropertyICollection.IsSynchronized

Gets a value indicating whether access to the ICollection is synchronized (thread safe).

System_CAPS_pubinterfaceSystem_CAPS_privpropertyICollection.SyncRoot

Gets an object that can be used to synchronize access to the ICollection.

System_CAPS_pubinterfaceSystem_CAPS_privpropertyIDictionary.Item[Object]

Gets or sets the element with the specified key.

NameDescription
System_CAPS_pubmethodAsParallel()

Overloaded. Enables parallelization of a query.(Defined by ParallelEnumerable.)

System_CAPS_pubmethodAsQueryable()

Overloaded. Converts an IEnumerable to an IQueryable.(Defined by Queryable.)

System_CAPS_pubmethodCast<TResult>()

Casts the elements of an IEnumerable to the specified type.(Defined by Enumerable.)

System_CAPS_pubmethodOfType<TResult>()

Filters the elements of an IEnumerable based on a specified type.(Defined by Enumerable.)

The DbConnectionStringBuilder class provides the base class from which the strongly typed connection string builders (SqlConnectionStringBuilder, OleDbConnectionStringBuilder, and so on) derive. The connection string builders let developers programmatically create syntactically correct connection strings, and parse and rebuild existing connection strings.

The DbConnectionStringBuilder has been defined in a database-agnostic manner. Because of the addition of the System.Data.Common namespace, developers require a base class against which they can program in order to build connection strings that can work against an arbitrary database. Therefore, the DbConnectionStringBuilder class lets users assign arbitrary key/value pairs and pass the resulting connection string to a strongly typed provider. All the data providers that are included as part of the .NET Framework provide a strongly typed class that inherits from DbConnectionStringBuilder: SqlConnectionStringBuilder, OracleConnectionStringBuilder, OdbcConnectionStringBuilder, and OleDbConnectionStringBuilder.

The developer can build, assign, and edit connection strings for any arbitrary provider. For providers that support specific key/value pairs, the connection string builder provides strongly typed properties corresponding to the known pairs. In order to support providers that require the ability to support unknown values, developers can also supply arbitrary key/value pairs.

The DbConnectionStringBuilder class implements the ICustomTypeDescriptor interface. This means that the class works with Visual Studio designers at design time. When developers use the designer to build strongly typed DataSets and strongly typed connections within Visual Studio, the strongly typed connection string builder class will display the properties associated with its type and will also have converters that can map common values for known keys.

Developers needing to create connection strings as part of applications can use the DbConnectionStringBuilder class or one of its strongly typed derivatives to build and modify connection strings. The DbConnectionStringBuilder class also makes it easy to manage connection strings stored in an application configuration file.

Developers can create connection strings using either a strongly typed connection string builder class, or they can use the DbConnectionStringBuilder class. The DbConnectionStringBuilder performs no checks for valid key/value pairs. Therefore, it is possible using this class to create invalid connection strings. The SqlConnectionStringBuilder supports only key/value pairs that are supported by SQL Server; trying to add invalid pairs will throw an exception.

Both the Add method and Item property handle tries to insert malicious entries. For example, the following code correctly escapes the nested key/value pair:

[Visual Basic]

Dim builder As New System.Data.Common.DbConnectionStringBuilder
builder("Data Source") = "(local)"
builder("integrated sSecurity") = True
builder("Initial Catalog") = "AdventureWorks;NewValue=Bad"

[C#]

System.Data.Common.DbConnectionStringBuilder builder = 
    new System.Data.Common.DbConnectionStringBuilder();
builder["Data Source"] = "(local)";
builder["integrated Security"] = true;
builder["Initial Catalog"] = "AdventureWorks;NewValue=Bad";

The result is the following connection string that handles the invalid value in a safe manner:

data source=(local);integrated security=True;
initial catalog="AdventureWorks;NewValue=Bad"

The following console application builds two connection strings, one for a Microsoft Jet database, and one for a SQL Server database. In each case, the code uses a generic DbConnectionStringBuilder class to create the connection string, and then passes the ConnectionString property of the DbConnectionStringBuilder instance to the constructor of the strongly type connection class. This is not required; the code could also have created individual strongly typed connection string builder instances. The example also parses an existing connection string, and demonstrates various ways of manipulating the connection string's contents.

C#
static void Main()
{
    DbConnectionStringBuilder builder =
                                                                        new DbConnectionStringBuilder();
    builder.ConnectionString = @"Data Source=c:\MyData\MyDb.mdb";
    builder.Add("Provider", "Microsoft.Jet.Oledb.4.0");
    builder.Add("Jet OLEDB:Database Password", "*******");
    builder.Add("Jet OLEDB:System Database",
                                                                        @"c:\MyData\Workgroup.mdb");
                                                                        // Set up row-level locking.
    builder.Add("Jet OLEDB:Database Locking Mode", 1);
                                                                        // The DbConnectionStringBuilder class 
                                                                        // is database agnostic, so it's possible to 
                                                                        // build any type of connection string using 
                                                                        // this class.
                                                                        // The ConnectionString property may have been 
                                                                        // formatted by the DbConnectionStringBuilder class.
    OleDbConnection oledbConnect = new
        OleDbConnection(builder.ConnectionString);
    Console.WriteLine(oledbConnect.ConnectionString);
                                                                        // Use the same DbConnectionStringBuilder to create 
                                                                        // a SqlConnection object.
    builder.Clear();
    builder.Add("integrated security", true);
    builder.Add("Initial Catalog", "AdventureWorks");
    builder.Add("Data Source", "(local)");
    SqlConnection sqlConnect = new
        SqlConnection(builder.ConnectionString);
    Console.WriteLine(sqlConnect.ConnectionString);
                                                                        // Pass the DbConnectionStringBuilder an existing 
                                                                        // connection string, and you can retrieve and
                                                                        // modify any of the elements.
    builder.ConnectionString = "server=(local);user id=*******;" +
                                                                        "password=*******;initial catalog=AdventureWorks";
    builder["Server"] = ".";
    builder.Remove("User ID");
                                                                        // Note that calling Remove on a nonexistent item doesn't
                                                                        // throw an exception.
    builder.Remove("BadItem");
                                                                        // Setting the indexer adds the value if 
                                                                        // necessary.
    builder["Integrated Security"] = true;
    builder.Remove("password");
    builder["User ID"] = "Hello";
    Console.WriteLine(builder.ConnectionString);
    Console.WriteLine("Press Enter to finish.");
    Console.ReadLine();
}

Universal Windows Platform
Available since 10
.NET Framework
Available since 2.0

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbProviderFactory Class

 

Represents a set of methods for creating instances of a provider's implementation of the data source classes.

Namespace:   System.Data.Common
Assembly:  System.Data (in System.Data.dll)


C#
public abstract class DbProviderFactory

NameDescription
System_CAPS_protmethodDbProviderFactory()

Initializes a new instance of a DbProviderFactory class.

NameDescription
System_CAPS_pubpropertyCanCreateDataSourceEnumerator

Specifies whether the specific DbProviderFactory supports the DbDataSourceEnumerator class.

NameDescription
System_CAPS_pubmethodCreateCommand()

Returns a new instance of the provider's class that implements the DbCommand class.

System_CAPS_pubmethodCreateCommandBuilder()

Returns a new instance of the provider's class that implements the DbCommandBuilder class.

System_CAPS_pubmethodCreateConnection()

Returns a new instance of the provider's class that implements the DbConnection class.

System_CAPS_pubmethodCreateConnectionStringBuilder()

Returns a new instance of the provider's class that implements the DbConnectionStringBuilder class.

System_CAPS_pubmethodCreateDataAdapter()

Returns a new instance of the provider's class that implements the DbDataAdapter class.

System_CAPS_pubmethodCreateDataSourceEnumerator()

Returns a new instance of the provider's class that implements the DbDataSourceEnumerator class.

System_CAPS_pubmethodCreateParameter()

Returns a new instance of the provider's class that implements the DbParameter class.

System_CAPS_pubmethodCreatePermission(PermissionState)

Returns a new instance of the provider's class that implements the provider's version of the CodeAccessPermission class.

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

Universal Windows Platform
Available since 10
.NET Framework
Available since 2.0

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbDataAdapter Class

 

Aids implementation of the IDbDataAdapter interface. Inheritors of DbDataAdapter implement a set of functions to provide strong typing, but inherit most of the functionality needed to fully implement a DataAdapter.

Namespace:   System.Data.Common
Assembly:  System.Data (in System.Data.dll)

System.Object
  System.MarshalByRefObject
    System.ComponentModel.Component
      System.Data.Common.DataAdapter
        System.Data.Common.DbDataAdapter
          System.Data.Odbc.OdbcDataAdapter
          System.Data.OleDb.OleDbDataAdapter
          System.Data.OracleClient.OracleDataAdapter
          System.Data.SqlClient.SqlDataAdapter

C#
public abstract class DbDataAdapter : DataAdapter, IDbDataAdapter, 
	IDataAdapter, ICloneable

NameDescription
System_CAPS_protmethodDbDataAdapter()

Initializes a new instance of a DataAdapter class.

System_CAPS_protmethodDbDataAdapter(DbDataAdapter)

Initializes a new instance of a DataAdapter class from an existing object of the same type.

NameDescription
System_CAPS_pubpropertyAcceptChangesDuringFill

Gets or sets a value indicating whether AcceptChanges is called on a DataRow after it is added to the DataTable during any of the Fill operations.(Inherited from DataAdapter.)

System_CAPS_pubpropertyAcceptChangesDuringUpdate

Gets or sets whether AcceptChanges is called during a Update.(Inherited from DataAdapter.)

System_CAPS_protpropertyCanRaiseEvents

Gets a value indicating whether the component can raise an event.(Inherited from Component.)

System_CAPS_pubpropertyContainer

Gets the IContainer that contains the Component.(Inherited from Component.)

System_CAPS_pubpropertyContinueUpdateOnError

Gets or sets a value that specifies whether to generate an exception when an error is encountered during a row update.(Inherited from DataAdapter.)

System_CAPS_pubpropertyDeleteCommand

Gets or sets a command for deleting records from the data set.

System_CAPS_protpropertyDesignMode

Gets a value that indicates whether the Component is currently in design mode.(Inherited from Component.)

System_CAPS_protpropertyEvents

Gets the list of event handlers that are attached to this Component.(Inherited from Component.)

System_CAPS_protpropertyFillCommandBehavior

Gets or sets the behavior of the command used to fill the data adapter.

System_CAPS_pubpropertyFillLoadOption

Gets or sets the LoadOption that determines how the adapter fills the DataTable from the DbDataReader.(Inherited from DataAdapter.)

System_CAPS_pubpropertyInsertCommand

Gets or sets a command used to insert new records into the data source.

System_CAPS_pubpropertyMissingMappingAction

Determines the action to take when incoming data does not have a matching table or column.(Inherited from DataAdapter.)

System_CAPS_pubpropertyMissingSchemaAction

Determines the action to take when existing DataSet schema does not match incoming data.(Inherited from DataAdapter.)

System_CAPS_pubpropertyReturnProviderSpecificTypes

Gets or sets whether the Fill method should return provider-specific values or common CLS-compliant values.(Inherited from DataAdapter.)

System_CAPS_pubpropertySelectCommand

Gets or sets a command used to select records in the data source.

System_CAPS_pubpropertySite

Gets or sets the ISite of the Component.(Inherited from Component.)

System_CAPS_pubpropertyTableMappings

Gets a collection that provides the master mapping between a source table and a DataTable.(Inherited from DataAdapter.)

System_CAPS_pubpropertyUpdateBatchSize

Gets or sets a value that enables or disables batch processing support, and specifies the number of commands that can be executed in a batch.

System_CAPS_pubpropertyUpdateCommand

Gets or sets a command used to update records in the data source.

NameDescription
System_CAPS_protmethodAddToBatch(IDbCommand)

Adds a IDbCommand to the current batch.

System_CAPS_protmethodClearBatch()

Removes all IDbCommand objects from the batch.

System_CAPS_protmethodCloneInternals()

Obsolete.Creates a copy of this instance of DataAdapter.(Inherited from DataAdapter.)

System_CAPS_pubmethodCreateObjRef(Type)

Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.(Inherited from MarshalByRefObject.)

System_CAPS_protmethodCreateRowUpdatedEvent(DataRow, IDbCommand, StatementType, DataTableMapping)

Initializes a new instance of the RowUpdatedEventArgs class.

System_CAPS_protmethodCreateRowUpdatingEvent(DataRow, IDbCommand, StatementType, DataTableMapping)

Initializes a new instance of the RowUpdatingEventArgs class.

System_CAPS_protmethodCreateTableMappings()

Creates a new DataTableMappingCollection.(Inherited from DataAdapter.)

System_CAPS_pubmethodDispose()

Releases all resources used by the Component.(Inherited from Component.)

System_CAPS_protmethodDispose(Boolean)

Releases the unmanaged resources used by the DbDataAdapter and optionally releases the managed resources.(Overrides DataAdapter.Dispose(Boolean).)

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodExecuteBatch()

Executes the current batch.

System_CAPS_pubmethodFill(DataSet)

Adds or refreshes rows in the DataSet.(Overrides DataAdapter.Fill(DataSet).)

System_CAPS_pubmethodFill(DataSet, Int32, Int32, String)

Adds or refreshes rows in a specified range in the DataSet to match those in the data source using the DataSet and DataTable names.

System_CAPS_protmethodFill(DataSet, Int32, Int32, String, IDbCommand, CommandBehavior)

Adds or refreshes rows in a specified range in the DataSet to match those in the data source using the DataSet and source table names, command string, and command behavior.

System_CAPS_pubmethodFill(DataSet, String)

Adds or refreshes rows in the DataSet to match those in the data source using the DataSet and DataTable names.

System_CAPS_protmethodFill(DataSet, String, IDataReader, Int32, Int32)

Adds or refreshes rows in a specified range in the DataSet to match those in the data source using the DataSet and DataTable names.(Inherited from DataAdapter.)

System_CAPS_pubmethodFill(DataTable)

Adds or refreshes rows in a specified range in the DataSet to match those in the data source using the DataTable name.

System_CAPS_protmethodFill(DataTable, IDataReader)

Adds or refreshes rows in the DataTable to match those in the data source using the DataTable name and the specified IDataReader.(Inherited from DataAdapter.)

System_CAPS_protmethodFill(DataTable, IDbCommand, CommandBehavior)

Adds or refreshes rows in a DataTable to match those in the data source using the specified DataTable, IDbCommand and CommandBehavior.

System_CAPS_protmethodFill(DataTable[], IDataReader, Int32, Int32)

Adds or refreshes rows in a specified range in the collection of DataTable objects to match those in the data source.(Inherited from DataAdapter.)

System_CAPS_protmethodFill(DataTable[], Int32, Int32, IDbCommand, CommandBehavior)

Adds or refreshes rows in a specified range in the DataSet to match those in the data source using the DataSet and DataTable names.

System_CAPS_pubmethodFill(Int32, Int32, DataTable[])

Adds or refreshes rows in a DataTable to match those in the data source starting at the specified record and retrieving up to the specified maximum number of records.

System_CAPS_pubmethodFillSchema(DataSet, SchemaType)

Adds a DataTable named "Table" to the specified DataSet and configures the schema to match that in the data source based on the specified SchemaType.(Overrides DataAdapter.FillSchema(DataSet, SchemaType).)

System_CAPS_protmethodFillSchema(DataSet, SchemaType, IDbCommand, String, CommandBehavior)

Adds a DataTable to the specified DataSet and configures the schema to match that in the data source based on the specified SchemaType.

System_CAPS_pubmethodFillSchema(DataSet, SchemaType, String)

Adds a DataTable to the specified DataSet and configures the schema to match that in the data source based upon the specified SchemaType and DataTable.

System_CAPS_protmethodFillSchema(DataSet, SchemaType, String, IDataReader)

Adds a DataTable to the specified DataSet.(Inherited from DataAdapter.)

System_CAPS_pubmethodFillSchema(DataTable, SchemaType)

Configures the schema of the specified DataTable based on the specified SchemaType.

System_CAPS_protmethodFillSchema(DataTable, SchemaType, IDataReader)

Adds a DataTable to the specified DataSet.(Inherited from DataAdapter.)

System_CAPS_protmethodFillSchema(DataTable, SchemaType, IDbCommand, CommandBehavior)

Configures the schema of the specified DataTable based on the specified SchemaType, command string, and CommandBehavior values.

System_CAPS_protmethodFinalize()

Releases unmanaged resources and performs other cleanup operations before the Component is reclaimed by garbage collection.(Inherited from Component.)

System_CAPS_protmethodGetBatchedParameter(Int32, Int32)

Returns a IDataParameter from one of the commands in the current batch.

System_CAPS_protmethodGetBatchedRecordsAffected(Int32, Int32, Exception)

Returns information about an individual update attempt within a larger batched update.

System_CAPS_pubmethodGetFillParameters()

Gets the parameters set by the user when executing an SQL SELECT statement.(Overrides DataAdapter.GetFillParameters().)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetLifetimeService()

Retrieves the current lifetime service object that controls the lifetime policy for this instance.(Inherited from MarshalByRefObject.)

System_CAPS_protmethodGetService(Type)

Returns an object that represents a service provided by the Component or by its Container.(Inherited from Component.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodHasTableMappings()

Indicates whether a DataTableMappingCollection has been created.(Inherited from DataAdapter.)

System_CAPS_protmethodInitializeBatching()

Initializes batching for the DbDataAdapter.

System_CAPS_pubmethodInitializeLifetimeService()

Obtains a lifetime service object to control the lifetime policy for this instance.(Inherited from MarshalByRefObject.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone(Boolean)

Creates a shallow copy of the current MarshalByRefObject object.(Inherited from MarshalByRefObject.)

System_CAPS_protmethodOnFillError(FillErrorEventArgs)

Invoked when an error occurs during a Fill.(Inherited from DataAdapter.)

System_CAPS_protmethodOnRowUpdated(RowUpdatedEventArgs)

Raises the RowUpdated event of a .NET Framework data provider.

System_CAPS_protmethodOnRowUpdating(RowUpdatingEventArgs)

Raises the RowUpdating event of a .NET Framework data provider.

System_CAPS_pubmethodResetFillLoadOption()

Resets FillLoadOption to its default state and causes DataAdapter.Fill to honor AcceptChangesDuringFill.(Inherited from DataAdapter.)

System_CAPS_pubmethodShouldSerializeAcceptChangesDuringFill()

Determines whether the AcceptChangesDuringFill property should be persisted.(Inherited from DataAdapter.)

System_CAPS_pubmethodShouldSerializeFillLoadOption()

Determines whether the FillLoadOption property should be persisted.(Inherited from DataAdapter.)

System_CAPS_protmethodShouldSerializeTableMappings()

Determines whether one or more DataTableMapping objects exist and they should be persisted.(Inherited from DataAdapter.)

System_CAPS_protmethodTerminateBatching()

Ends batching for the DbDataAdapter.

System_CAPS_pubmethodToString()

Returns a String containing the name of the Component, if any. This method should not be overridden.(Inherited from Component.)

System_CAPS_pubmethodUpdate(DataRow[])

Updates the values in the database by executing the respective INSERT, UPDATE, or DELETE statements for each inserted, updated, or deleted row in the specified array in the DataSet.

System_CAPS_protmethodUpdate(DataRow[], DataTableMapping)

Updates the values in the database by executing the respective INSERT, UPDATE, or DELETE statements for each inserted, updated, or deleted row in the specified array of DataSet objects.

System_CAPS_pubmethodUpdate(DataSet)

Updates the values in the database by executing the respective INSERT, UPDATE, or DELETE statements for each inserted, updated, or deleted row in the specified DataSet.(Overrides DataAdapter.Update(DataSet).)

System_CAPS_pubmethodUpdate(DataSet, String)

Updates the values in the database by executing the respective INSERT, UPDATE, or DELETE statements for each inserted, updated, or deleted row in the DataSet with the specified DataTable name.

System_CAPS_pubmethodUpdate(DataTable)

Updates the values in the database by executing the respective INSERT, UPDATE, or DELETE statements for each inserted, updated, or deleted row in the specified DataTable.

NameDescription
System_CAPS_pubfieldSystem_CAPS_staticDefaultSourceTableName

The default name used by the DataAdapter object for table mappings.

NameDescription
System_CAPS_pubeventDisposed

Occurs when the component is disposed by a call to the Dispose method. (Inherited from Component.)

System_CAPS_pubeventFillError

Returned when an error occurs during a fill operation.(Inherited from DataAdapter.)

NameDescription
System_CAPS_pubinterfaceSystem_CAPS_privmethodICloneable.Clone()

Creates a new object that is a copy of the current instance.

System_CAPS_pubinterfaceSystem_CAPS_privpropertyIDataAdapter.TableMappings

Indicates how a source table is mapped to a dataset table.(Inherited from DataAdapter.)

System_CAPS_pubinterfaceSystem_CAPS_privpropertyIDbDataAdapter.DeleteCommand

Gets or sets an SQL statement for deleting records from the data set.

System_CAPS_pubinterfaceSystem_CAPS_privpropertyIDbDataAdapter.InsertCommand

Gets or sets an SQL statement used to insert new records into the data source.

System_CAPS_pubinterfaceSystem_CAPS_privpropertyIDbDataAdapter.SelectCommand

Gets or sets an SQL statement used to select records in the data source.

System_CAPS_pubinterfaceSystem_CAPS_privpropertyIDbDataAdapter.UpdateCommand

Gets or sets an SQL statement used to update records in the data source.

The DbDataAdapter class inherits from the DataAdapter class and helps a class implement a DataAdapter designed for use with a relational database.

An application does not create an instance of the DbDataAdapter interface directly, but creates an instance of a class that inherits IDbDataAdapter and DbDataAdapter.

Classes that inherit DbDataAdapter must implement the inherited members, and typically define additional members to add provider-specific functionality. For example, the DbDataAdapter class defines the SelectCommand property, and the DbDataAdapter interface defines eight overloads of the Fill method. In turn, the OleDbDataAdapter class inherits the Fill method, and also defines two additional overloads of Fill that take an ADO Recordset object as a parameter.

Notes to Inheritors:

When you inherit from the DbDataAdapter class, we recommend that you implement the following constructors:

Item

Description

PrvDataAdapter()

Initializes a new instance of the PrvDataAdapter class.

PrvDataAdapter(PrvCommand selectCommand)

Initializes a new instance of the PrvDataAdapter class with the specified SQL SELECT statement.

PrvDataAdapter(string selectCommandText, string selectConnectionString)

Initializes a new instance of the PrvDataAdapter class with an SQL SELECT statement and a connection string.

PrvDataAdapter(string selectCommandText, PrvConnection selectConnection)

Initializes a new instance of the PrvDataAdapter class with an SQL SELECT statement and a PrvConnection object.

To promote consistency among .NET Framework data providers, you should name the inheriting class in the form PrvDataAdapter, where Prv is the uniform prefix given to all classes in a specific .NET Framework data provider namespace. For example, "Sql" is the prefix of the SqlDataAdapter class in the System.Data.SqlClient namespace.

.NET Framework
Available since 1.1

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbCommandDefinition Class

 

Defines a cacheable command plan.

Namespace:   System.Data.Common
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

System.Object
  System.Data.Common.DbCommandDefinition

C#
public class DbCommandDefinition

NameDescription
System_CAPS_protmethodDbCommandDefinition()

Initializes a new instance of the DbCommandDefinition class.

System_CAPS_protmethodDbCommandDefinition(DbCommand)

Initializes a new instance of the DbCommandDefinition class using the supplied DbCommand.

NameDescription
System_CAPS_pubmethodCreateCommand()

Creates and returns a DbCommand object that can be executed.

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

The DbCommandDefinition class is used by the Entity Framework and is not intended for use as a stand-alone component.

.NET Framework
Available since 3.5

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbCommandDefinition Constructor

 

Initializes a new instance of the DbCommandDefinition class.

Namespace:   System.Data.Common
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

NameDescription
System_CAPS_protmethodDbCommandDefinition()

Initializes a new instance of the DbCommandDefinition class.

System_CAPS_protmethodDbCommandDefinition(DbCommand)

Initializes a new instance of the DbCommandDefinition class using the supplied DbCommand.

Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbCommandDefinition Constructor ()

 

Initializes a new instance of the DbCommandDefinition class.

Namespace:   System.Data.Common
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

C#
protected DbCommandDefinition()

The default constructor is used by classes that derive from DbCommandDefinition.

.NET Framework
Available since 3.5
Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbCommandDefinition Constructor (DbCommand)

 

Initializes a new instance of the DbCommandDefinition class using the supplied DbCommand.

Namespace:   System.Data.Common
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

C#
protected DbCommandDefinition(
	DbCommand prototype
)

Parameters

prototype
Type: System.Data.Common.DbCommand

The supplied DbCommand.

The supplied DbCommand must implement ICloneable; otherwise a ProviderIncompatibleException is raised.

This constructor is used by classes that derive from DbCommandDefinition.

.NET Framework
Available since 3.5
Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbCommandDefinition Methods

 

Namespace:   System.Data.Common
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

NameDescription
System_CAPS_pubmethodCreateCommand()

Creates and returns a DbCommand object that can be executed.

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbCommandDefinition.CreateCommand Method ()

 

Creates and returns a DbCommand object that can be executed.

Namespace:   System.Data.Common
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

C#
public virtual DbCommand CreateCommand()

Return Value

Type: System.Data.Common.DbCommand

The command for database.

.NET Framework
Available since 3.5
Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbException Class

 

The base class for all exceptions thrown on behalf of the data source.

Namespace:   System.Data.Common
Assembly:  System.Data (in System.Data.dll)

System.Object
  System.Exception
    System.SystemException
      System.Runtime.InteropServices.ExternalException
        System.Data.Common.DbException
          System.Data.Odbc.OdbcException
          System.Data.OleDb.OleDbException
          System.Data.OracleClient.OracleException
          System.Data.SqlClient.SqlException

C#
[SerializableAttribute]
public abstract class DbException : ExternalException

NameDescription
System_CAPS_protmethodDbException()

Initializes a new instance of the DbException class.

System_CAPS_protmethodDbException(SerializationInfo, StreamingContext)

Initializes a new instance of the DbException class with the specified serialization information and context.

System_CAPS_protmethodDbException(String)

Initializes a new instance of the DbException class with the specified error message.

System_CAPS_protmethodDbException(String, Exception)

Initializes a new instance of the DbException class with the specified error message and a reference to the inner exception that is the cause of this exception.

System_CAPS_protmethodDbException(String, Int32)

Initializes a new instance of the DbException class with the specified error message and error code.

NameDescription
System_CAPS_pubpropertyData

Gets a collection of key/value pairs that provide additional user-defined information about the exception.(Inherited from Exception.)

System_CAPS_pubpropertyErrorCode

Gets the HRESULT of the error.(Inherited from ExternalException.)

System_CAPS_pubpropertyHelpLink

Gets or sets a link to the help file associated with this exception.(Inherited from Exception.)

System_CAPS_pubpropertyHResult

Gets or sets HRESULT, a coded numerical value that is assigned to a specific exception.(Inherited from Exception.)

System_CAPS_pubpropertyInnerException

Gets the Exception instance that caused the current exception.(Inherited from Exception.)

System_CAPS_pubpropertyMessage

Gets a message that describes the current exception.(Inherited from Exception.)

System_CAPS_pubpropertySource

Gets or sets the name of the application or the object that causes the error.(Inherited from Exception.)

System_CAPS_pubpropertyStackTrace

Gets a string representation of the immediate frames on the call stack.(Inherited from Exception.)

System_CAPS_pubpropertyTargetSite

Gets the method that throws the current exception.(Inherited from Exception.)

NameDescription
System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetBaseException()

When overridden in a derived class, returns the Exception that is the root cause of one or more subsequent exceptions.(Inherited from Exception.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetObjectData(SerializationInfo, StreamingContext)

When overridden in a derived class, sets the SerializationInfo with information about the exception.(Inherited from Exception.)

System_CAPS_pubmethodGetType()

Gets the runtime type of the current instance.(Inherited from Exception.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns a string that contains the HRESULT of the error.(Inherited from ExternalException.)

NameDescription
System_CAPS_proteventSerializeObjectState

Occurs when an exception is serialized to create an exception state object that contains serialized data about the exception.(Inherited from Exception.)

The DbException class is an abstract class used as the base class for provider-specific exception class implementations.

For general information about handling exceptions for a .NET Framework data provider, see SqlException.

Universal Windows Platform
Available since 10
.NET Framework
Available since 2.0
Windows Phone Silverlight
Available since 7.1

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbException Constructor

 

Initializes a new instance of the DbException class.

Namespace:   System.Data.Common
Assembly:  System.Data (in System.Data.dll)

NameDescription
System_CAPS_protmethodDbException()

Initializes a new instance of the DbException class.

System_CAPS_protmethodDbException(SerializationInfo, StreamingContext)

Initializes a new instance of the DbException class with the specified serialization information and context.

System_CAPS_protmethodDbException(String)

Initializes a new instance of the DbException class with the specified error message.

System_CAPS_protmethodDbException(String, Exception)

Initializes a new instance of the DbException class with the specified error message and a reference to the inner exception that is the cause of this exception.

System_CAPS_protmethodDbException(String, Int32)

Initializes a new instance of the DbException class with the specified error message and error code.

The DbException class is an abstract class used as the base class for provider-specific exception class implementations.

Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbException Constructor ()

 

Initializes a new instance of the DbException class.

Namespace:   System.Data.Common
Assembly:  System.Data (in System.Data.dll)

C#
protected DbException()

The DbException class is an abstract class used as the base class for provider-specific exception class implementations.

Universal Windows Platform
Available since 10
.NET Framework
Available since 2.0
Windows Phone Silverlight
Available since 7.1
Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbException Constructor (SerializationInfo, StreamingContext)

 
Use BaseTrue

Initializes a new instance of the DbException class with the specified serialization information and context.

Namespace:   System.Data.Common
Assembly:  System.Data (in System.Data.dll)

C#
protected DbException(
	SerializationInfo info,
	StreamingContext context
)

Parameters

info
Type: System.Runtime.Serialization.SerializationInfo

The SerializationInfo that holds the serialized object data about the exception being thrown.

context
Type: System.Runtime.Serialization.StreamingContext

The StreamingContext that contains contextual information about the source or destination.

The DbException class is an abstract class used as the base class for provider-specific exception class implementations.

.NET Framework
Available since 2.0
Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbException Constructor (String)

 
Use BaseTrue

Initializes a new instance of the DbException class with the specified error message.

Namespace:   System.Data.Common
Assembly:  System.Data (in System.Data.dll)

C#
protected DbException(
                                                            string message
)

Parameters

message
Type: System.String

The message to display for this exception.

The DbException class is an abstract class used as the base class for provider-specific exception class implementations.

Universal Windows Platform
Available since 10
.NET Framework
Available since 2.0
Windows Phone Silverlight
Available since 7.1
Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbException Constructor (String, Exception)

 
Use BaseTrue

Initializes a new instance of the DbException class with the specified error message and a reference to the inner exception that is the cause of this exception.

Namespace:   System.Data.Common
Assembly:  System.Data (in System.Data.dll)

C#
protected DbException(
                                                            string message,
	Exception innerException
)

Parameters

message
Type: System.String

The error message string.

innerException
Type: System.Exception

The inner exception reference.

The DbException class is an abstract class used as the base class for provider-specific exception class implementations.

Universal Windows Platform
Available since 10
.NET Framework
Available since 2.0
Windows Phone Silverlight
Available since 7.1
Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbException Constructor (String, Int32)

 

Initializes a new instance of the DbException class with the specified error message and error code.

Namespace:   System.Data.Common
Assembly:  System.Data (in System.Data.dll)

C#
protected DbException(
                                                            string message,
                                                            int errorCode
)

Parameters

message
Type: System.String

The error message that explains the reason for the exception.

errorCode
Type: System.Int32

The error code for the exception.

The DbException class is an abstract class used as the base class for provider-specific exception class implementations.

.NET Framework
Available since 2.0
Windows Phone Silverlight
Available since 7.1
Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbException Methods

 

Namespace:   System.Data.Common
Assembly:  System.Data (in System.Data.dll)

NameDescription
System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetBaseException()

When overridden in a derived class, returns the Exception that is the root cause of one or more subsequent exceptions.(Inherited from Exception.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetObjectData(SerializationInfo, StreamingContext)

When overridden in a derived class, sets the SerializationInfo with information about the exception.(Inherited from Exception.)

System_CAPS_pubmethodGetType()

Gets the runtime type of the current instance.(Inherited from Exception.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns a string that contains the HRESULT of the error.(Inherited from ExternalException.)

Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbException Properties

 

Namespace:   System.Data.Common
Assembly:  System.Data (in System.Data.dll)

NameDescription
System_CAPS_pubpropertyData

Gets a collection of key/value pairs that provide additional user-defined information about the exception.(Inherited from Exception.)

System_CAPS_pubpropertyErrorCode

Gets the HRESULT of the error.(Inherited from ExternalException.)

System_CAPS_pubpropertyHelpLink

Gets or sets a link to the help file associated with this exception.(Inherited from Exception.)

System_CAPS_pubpropertyHResult

Gets or sets HRESULT, a coded numerical value that is assigned to a specific exception.(Inherited from Exception.)

System_CAPS_pubpropertyInnerException

Gets the Exception instance that caused the current exception.(Inherited from Exception.)

System_CAPS_pubpropertyMessage

Gets a message that describes the current exception.(Inherited from Exception.)

System_CAPS_pubpropertySource

Gets or sets the name of the application or the object that causes the error.(Inherited from Exception.)

System_CAPS_pubpropertyStackTrace

Gets a string representation of the immediate frames on the call stack.(Inherited from Exception.)

System_CAPS_pubpropertyTargetSite

Gets the method that throws the current exception.(Inherited from Exception.)

Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbException Events

.NET Framework (current version)
 

Namespace:   System.Data.Common
Assembly:  System.Data (in System.Data.dll)

NameDescription
System_CAPS_proteventSerializeObjectState

Occurs when an exception is serialized to create an exception state object that contains serialized data about the exception.(Inherited from Exception.)

Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbProviderManifest Class

 

Metadata Interface for all CLR types types

Namespace:   System.Data.Common
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

System.Object
  System.Data.Common.DbProviderManifest
    System.Data.Common.DbXmlEnabledProviderManifest

C#
public abstract class DbProviderManifest

NameDescription
System_CAPS_protmethodDbProviderManifest()

Initializes a new instance of the DbProviderManifest class.

NameDescription
System_CAPS_pubpropertyNamespaceName

Gets the namespace used by this provider manifest.

NameDescription
System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_pubmethodEscapeLikeArgument(String)

Provider writers should override this method to return the argument with the wildcards and the escape character escaped. This method is only used if SupportsEscapingLikeArgument returns true.

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_protmethodGetDbInformation(String)

When overridden in a derived class, this method returns provider-specific information.

System_CAPS_pubmethodGetEdmType(TypeUsage)

When overridden in a derived class, this method maps the specified storage type and a set of facets for that type to an EDM type.

System_CAPS_pubmethodGetFacetDescriptions(EdmType)

Returns the FacetDescription objects for a particular type.

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetInformation(String)

Gets the provider-specific information.

System_CAPS_pubmethodGetStoreFunctions()

When overridden in a derived class, returns a collection of EDM functions supported by the provider manifest.

System_CAPS_pubmethodGetStoreType(TypeUsage)

When overridden in a derived class, this method maps the specified EDM type and a set of facets for that type to a storage type.

System_CAPS_pubmethodGetStoreTypes()

When overridden in a derived class, returns the set of primitive types supported by the data source.

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodSupportsEscapingLikeArgument(Char)

Indicates if the provider supports escaping strings to be used as patterns in a Like expression.

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

NameDescription
System_CAPS_pubfieldSystem_CAPS_staticConceptualSchemaDefinition

Value to pass to GetInformation to get the ConceptualSchemaDefinitionVersion.

System_CAPS_pubfieldSystem_CAPS_staticConceptualSchemaDefinitionVersion3

Value to pass to GetInformation to get the ConceptualSchemaDefinitionVersion3.

System_CAPS_pubfieldSystem_CAPS_staticStoreSchemaDefinition

Value to pass to GetInformation to get the StoreSchemaDefinitionVersion.

System_CAPS_pubfieldSystem_CAPS_staticStoreSchemaDefinitionVersion3

Value to pass to GetInformation to get the StoreSchemaDefinitionVersion3.

System_CAPS_pubfieldSystem_CAPS_staticStoreSchemaMapping

Value to pass to GetInformation to get the StoreSchemaMappingVersion.

System_CAPS_pubfieldSystem_CAPS_staticStoreSchemaMappingVersion3

Value to pass to GetInformation to get the StoreSchemaMappingVersion3.

No content here will be updated; please do not add material here.

.NET Framework
Available since 3.5

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbProviderManifest Fields

 

Namespace:   System.Data.Common
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

NameDescription
System_CAPS_pubfieldSystem_CAPS_staticConceptualSchemaDefinition

Value to pass to GetInformation to get the ConceptualSchemaDefinitionVersion.

System_CAPS_pubfieldSystem_CAPS_staticConceptualSchemaDefinitionVersion3

Value to pass to GetInformation to get the ConceptualSchemaDefinitionVersion3.

System_CAPS_pubfieldSystem_CAPS_staticStoreSchemaDefinition

Value to pass to GetInformation to get the StoreSchemaDefinitionVersion.

System_CAPS_pubfieldSystem_CAPS_staticStoreSchemaDefinitionVersion3

Value to pass to GetInformation to get the StoreSchemaDefinitionVersion3.

System_CAPS_pubfieldSystem_CAPS_staticStoreSchemaMapping

Value to pass to GetInformation to get the StoreSchemaMappingVersion.

System_CAPS_pubfieldSystem_CAPS_staticStoreSchemaMappingVersion3

Value to pass to GetInformation to get the StoreSchemaMappingVersion3.

Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbProviderManifest.ConceptualSchemaDefinition Field

 

Value to pass to GetInformation to get the ConceptualSchemaDefinitionVersion.

Namespace:   System.Data.Common
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

C#
public static readonly string ConceptualSchemaDefinition

Field Value

Type: System.String

.NET Framework
Available since 3.5
Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbProviderManifest.ConceptualSchemaDefinitionVersion3 Field

.NET Framework (current version)
 

Value to pass to GetInformation to get the ConceptualSchemaDefinitionVersion3.

Namespace:   System.Data.Common
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

C#
public static readonly string ConceptualSchemaDefinitionVersion3

Field Value

Type: System.String

.NET Framework
Available since 4.5
Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbProviderManifest.StoreSchemaDefinition Field

 

Value to pass to GetInformation to get the StoreSchemaDefinitionVersion.

Namespace:   System.Data.Common
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

C#
public static readonly string StoreSchemaDefinition

Field Value

Type: System.String

.NET Framework
Available since 3.5
Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbProviderManifest.StoreSchemaDefinitionVersion3 Field

.NET Framework (current version)
 

Value to pass to GetInformation to get the StoreSchemaDefinitionVersion3.

Namespace:   System.Data.Common
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

C#
public static readonly string StoreSchemaDefinitionVersion3

Field Value

Type: System.String

.NET Framework
Available since 4.5
Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbProviderManifest.StoreSchemaMapping Field

 

Value to pass to GetInformation to get the StoreSchemaMappingVersion.

Namespace:   System.Data.Common
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

C#
public static readonly string StoreSchemaMapping

Field Value

Type: System.String

.NET Framework
Available since 3.5
Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbProviderManifest.StoreSchemaMappingVersion3 Field

.NET Framework (current version)
 

Value to pass to GetInformation to get the StoreSchemaMappingVersion3.

Namespace:   System.Data.Common
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

C#
public static readonly string StoreSchemaMappingVersion3

Field Value

Type: System.String

.NET Framework
Available since 4.5
Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbProviderManifest Methods

 

Namespace:   System.Data.Common
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

NameDescription
System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_pubmethodEscapeLikeArgument(String)

Provider writers should override this method to return the argument with the wildcards and the escape character escaped. This method is only used if SupportsEscapingLikeArgument returns true.

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_protmethodGetDbInformation(String)

When overridden in a derived class, this method returns provider-specific information.

System_CAPS_pubmethodGetEdmType(TypeUsage)

When overridden in a derived class, this method maps the specified storage type and a set of facets for that type to an EDM type.

System_CAPS_pubmethodGetFacetDescriptions(EdmType)

Returns the FacetDescription objects for a particular type.

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetInformation(String)

Gets the provider-specific information.

System_CAPS_pubmethodGetStoreFunctions()

When overridden in a derived class, returns a collection of EDM functions supported by the provider manifest.

System_CAPS_pubmethodGetStoreType(TypeUsage)

When overridden in a derived class, this method maps the specified EDM type and a set of facets for that type to a storage type.

System_CAPS_pubmethodGetStoreTypes()

When overridden in a derived class, returns the set of primitive types supported by the data source.

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodSupportsEscapingLikeArgument(Char)

Indicates if the provider supports escaping strings to be used as patterns in a Like expression.

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbProviderManifest.EscapeLikeArgument Method (String)

.NET Framework (current version)
 

Provider writers should override this method to return the argument with the wildcards and the escape character escaped. This method is only used if SupportsEscapingLikeArgument returns true.

Namespace:   System.Data.Common
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

C#
public virtual string EscapeLikeArgument(
                                                            string argument
)

Parameters

argument
Type: System.String

The argument to be escaped.

Return Value

Type: System.String

The argument with the wildcards and the escape character escaped.

.NET Framework
Available since 4.0
Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbProviderManifest.GetDbInformation Method (String)

 

When overridden in a derived class, this method returns provider-specific information.

Namespace:   System.Data.Common
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

C#
protected abstract XmlReader GetDbInformation(
                                                            string informationType
)

Parameters

informationType
Type: System.String

The type of the information to return.

Return Value

Type: System.Xml.XmlReader

The XmlReader object that represents the mapping to the underlying data store catalog.

.NET Framework
Available since 3.5
Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbProviderManifest.GetEdmType Method (TypeUsage)

 

When overridden in a derived class, this method maps the specified storage type and a set of facets for that type to an EDM type.

Namespace:   System.Data.Common
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

C#
public abstract TypeUsage GetEdmType(
	TypeUsage storeType
)

Parameters

storeType
Type: System.Data.Metadata.Edm.TypeUsage

The TypeUsage instance that describes a storage type and a set of facets for that type to be mapped to the EDM type.

Return Value

Type: System.Data.Metadata.Edm.TypeUsage

The TypeUsage instance that describes an EDM type and a set of facets for that type.

.NET Framework
Available since 3.5
Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbProviderManifest.GetFacetDescriptions Method (EdmType)

 

Returns the FacetDescription objects for a particular type.

Namespace:   System.Data.Common
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

C#
public abstract ReadOnlyCollection<FacetDescription> GetFacetDescriptions(
	EdmType edmType
)

Parameters

edmType
Type: System.Data.Metadata.Edm.EdmType

The EDM type to return the facet description for.

Return Value

Type: System.Collections.ObjectModel.ReadOnlyCollection<FacetDescription>

The FacetDescription objects for the specified EDM type.

.NET Framework
Available since 3.5
Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbProviderManifest.GetInformation Method (String)

 

Gets the provider-specific information.

Namespace:   System.Data.Common
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

C#
public XmlReader GetInformation(
                                                            string informationType
)

Parameters

informationType
Type: System.String

The type of the information to return.

Return Value

Type: System.Xml.XmlReader

The provider-specific information.

.NET Framework
Available since 3.5
Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbProviderManifest.GetStoreFunctions Method ()

 

When overridden in a derived class, returns a collection of EDM functions supported by the provider manifest.

Namespace:   System.Data.Common
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

C#
public abstract ReadOnlyCollection<EdmFunction> GetStoreFunctions()

Return Value

Type: System.Collections.ObjectModel.ReadOnlyCollection<EdmFunction>

A collection of EDM functions.

.NET Framework
Available since 3.5
Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbProviderManifest.GetStoreType Method (TypeUsage)

 

When overridden in a derived class, this method maps the specified EDM type and a set of facets for that type to a storage type.

Namespace:   System.Data.Common
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

C#
public abstract TypeUsage GetStoreType(
	TypeUsage edmType
)

Parameters

edmType
Type: System.Data.Metadata.Edm.TypeUsage

The TypeUsage instance that describes the EDM type and a set of facets for that type to be mapped to a storage type.

Return Value

Type: System.Data.Metadata.Edm.TypeUsage

The TypeUsage instance that describes a storage type and a set of facets for that type.

.NET Framework
Available since 3.5
Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbProviderManifest.GetStoreTypes Method ()

 

When overridden in a derived class, returns the set of primitive types supported by the data source.

Namespace:   System.Data.Common
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

C#
public abstract ReadOnlyCollection<PrimitiveType> GetStoreTypes()

Return Value

Type: System.Collections.ObjectModel.ReadOnlyCollection<PrimitiveType>

The set of types supported by the data source.

.NET Framework
Available since 3.5
Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbProviderManifest.SupportsEscapingLikeArgument Method (Char)

.NET Framework (current version)
 

Indicates if the provider supports escaping strings to be used as patterns in a Like expression.

Namespace:   System.Data.Common
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

C#
public virtual bool SupportsEscapingLikeArgument(
                                                            out char escapeCharacter
)

Parameters

escapeCharacter
Type: System.Char

If the provider supports escaping, the character that would be used as the escape character.

Return Value

Type: System.Boolean

True if this provider supports escaping strings to be used as patterns in a Like expression; otherwise, false.

.NET Framework
Available since 4.0
Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbProviderManifest Properties

 

Namespace:   System.Data.Common
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

NameDescription
System_CAPS_pubpropertyNamespaceName

Gets the namespace used by this provider manifest.

Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbProviderManifest.NamespaceName Property

 

Gets the namespace used by this provider manifest.

Namespace:   System.Data.Common
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

C#
public abstract string NamespaceName { get; }

Property Value

Type: System.String

The namespace used by this provider manifest.

.NET Framework
Available since 3.5
Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbProviderManifest Constructor ()

 

Initializes a new instance of the DbProviderManifest class.

Namespace:   System.Data.Common
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

C#
protected DbProviderManifest()

.NET Framework
Available since 3.5
Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbProviderServices Class

 

The factory for building command definitions; use the type of this object as the argument to the IServiceProvider.GetService method on the provider factory;

This API is not CLS-compliant.

Namespace:   System.Data.Common
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

System.Object
  System.Data.Common.DbProviderServices
    System.Data.SqlClient.SqlProviderServices

C#
[CLSCompliantAttribute(false)]
public abstract class DbProviderServices

NameDescription
System_CAPS_protmethodDbProviderServices()

Initializes a new instance of the DbProviderServices class.

NameDescription
System_CAPS_pubmethodCreateCommandDefinition(DbCommand)

Creates a command definition that uses a specified command.

System_CAPS_pubmethodCreateCommandDefinition(DbCommandTree)

Creates command definition from command tree.

System_CAPS_pubmethodCreateCommandDefinition(DbProviderManifest, DbCommandTree)

Creates command definition from specified manifest andcommand tree.

System_CAPS_pubmethodCreateDatabase(DbConnection, Nullable<Int32>, StoreItemCollection)

Creates a database indicated by connection and creates schema objects.

System_CAPS_pubmethodCreateDatabaseScript(String, StoreItemCollection)

Generates a data definition langauge (DDL script that creates schema objects (tables, primary keys, foreign keys) based on the contents of the StoreItemCollection parameter and targeted for the version of the database corresponding to the provider manifest token.

System_CAPS_protmethodCreateDbCommandDefinition(DbProviderManifest, DbCommandTree)

Creates a command definition object for the specified provider manifest and command tree.

System_CAPS_pubmethodDatabaseExists(DbConnection, Nullable<Int32>, StoreItemCollection)

Returns a value indicating whether a given database exists on the server and whether schema objects contained in the storeItemCollection have been created.

System_CAPS_protmethodDbCreateDatabase(DbConnection, Nullable<Int32>, StoreItemCollection)

Creates a database indicated by connection and creates schema objects (tables, primary keys, foreign keys) based on the contents of a StoreItemCollection.

System_CAPS_protmethodDbCreateDatabaseScript(String, StoreItemCollection)

Generates a data definition langauge (DDL script that creates schema objects (tables, primary keys, foreign keys) based on the contents of the StoreItemCollection parameter and targeted for the version of the database corresponding to the provider manifest token.

System_CAPS_protmethodDbDatabaseExists(DbConnection, Nullable<Int32>, StoreItemCollection)

Returns a value indicating whether a given database exists on the server and whether schema objects contained in the storeItemCollection have been created.

System_CAPS_protmethodDbDeleteDatabase(DbConnection, Nullable<Int32>, StoreItemCollection)

Deletes all store objects specified in the store item collection from the database and the database itself.

System_CAPS_protmethodDbGetSpatialServices(String)

Gets the spatial services for the DbProviderServices.

System_CAPS_pubmethodDeleteDatabase(DbConnection, Nullable<Int32>, StoreItemCollection)

Deletes all store objects specified in the store item collection from the database and the database itself.

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_protmethodGetDbProviderManifest(String)

When overridden in a derived class, returns an instance of a class that derives from the DbProviderManifest.

System_CAPS_protmethodGetDbProviderManifestToken(DbConnection)

Returns provider manifest token given a connection.

System_CAPS_protmethodGetDbSpatialDataReader(DbDataReader, String)

Gets the spatial data reader for the DbProviderServices.

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodSystem_CAPS_staticGetProviderFactory(DbConnection)

Retrieves the DbProviderFactory based on the specified DbConnection.

System_CAPS_pubmethodGetProviderManifest(String)

Returns the provider manifest by using the specified version information.

System_CAPS_pubmethodGetProviderManifestToken(DbConnection)

Returns provider manifest token.

System_CAPS_pubmethodSystem_CAPS_staticGetProviderServices(DbConnection)

Returns providers given a connection.

System_CAPS_pubmethodGetSpatialDataReader(DbDataReader, String)

Gets the spatial data reader for the DbProviderServices.

System_CAPS_pubmethodGetSpatialServices(String)

Gets the spatial services for the DbProviderServices.

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_protmethodSetDbParameterValue(DbParameter, TypeUsage, Object)

Sets the parameter values for the DbProviderServices.

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

No content here will be updated; please do not add material here.

.NET Framework
Available since 3.5

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbProviderServices Methods

 

Namespace:   System.Data.Common
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

NameDescription
System_CAPS_pubmethodCreateCommandDefinition(DbCommand)

Creates a command definition that uses a specified command.

System_CAPS_pubmethodCreateCommandDefinition(DbCommandTree)

Creates command definition from command tree.

System_CAPS_pubmethodCreateCommandDefinition(DbProviderManifest, DbCommandTree)

Creates command definition from specified manifest andcommand tree.

System_CAPS_pubmethodCreateDatabase(DbConnection, Nullable<Int32>, StoreItemCollection)

Creates a database indicated by connection and creates schema objects.

System_CAPS_pubmethodCreateDatabaseScript(String, StoreItemCollection)

Generates a data definition langauge (DDL script that creates schema objects (tables, primary keys, foreign keys) based on the contents of the StoreItemCollection parameter and targeted for the version of the database corresponding to the provider manifest token.

System_CAPS_protmethodCreateDbCommandDefinition(DbProviderManifest, DbCommandTree)

Creates a command definition object for the specified provider manifest and command tree.

System_CAPS_pubmethodDatabaseExists(DbConnection, Nullable<Int32>, StoreItemCollection)

Returns a value indicating whether a given database exists on the server and whether schema objects contained in the storeItemCollection have been created.

System_CAPS_protmethodDbCreateDatabase(DbConnection, Nullable<Int32>, StoreItemCollection)

Creates a database indicated by connection and creates schema objects (tables, primary keys, foreign keys) based on the contents of a StoreItemCollection.

System_CAPS_protmethodDbCreateDatabaseScript(String, StoreItemCollection)

Generates a data definition langauge (DDL script that creates schema objects (tables, primary keys, foreign keys) based on the contents of the StoreItemCollection parameter and targeted for the version of the database corresponding to the provider manifest token.

System_CAPS_protmethodDbDatabaseExists(DbConnection, Nullable<Int32>, StoreItemCollection)

Returns a value indicating whether a given database exists on the server and whether schema objects contained in the storeItemCollection have been created.

System_CAPS_protmethodDbDeleteDatabase(DbConnection, Nullable<Int32>, StoreItemCollection)

Deletes all store objects specified in the store item collection from the database and the database itself.

System_CAPS_protmethodDbGetSpatialServices(String)

Gets the spatial services for the DbProviderServices.

System_CAPS_pubmethodDeleteDatabase(DbConnection, Nullable<Int32>, StoreItemCollection)

Deletes all store objects specified in the store item collection from the database and the database itself.

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_protmethodGetDbProviderManifest(String)

When overridden in a derived class, returns an instance of a class that derives from the DbProviderManifest.

System_CAPS_protmethodGetDbProviderManifestToken(DbConnection)

Returns provider manifest token given a connection.

System_CAPS_protmethodGetDbSpatialDataReader(DbDataReader, String)

Gets the spatial data reader for the DbProviderServices.

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodSystem_CAPS_staticGetProviderFactory(DbConnection)

Retrieves the DbProviderFactory based on the specified DbConnection.

System_CAPS_pubmethodGetProviderManifest(String)

Returns the provider manifest by using the specified version information.

System_CAPS_pubmethodGetProviderManifestToken(DbConnection)

Returns provider manifest token.

System_CAPS_pubmethodSystem_CAPS_staticGetProviderServices(DbConnection)

Returns providers given a connection.

System_CAPS_pubmethodGetSpatialDataReader(DbDataReader, String)

Gets the spatial data reader for the DbProviderServices.

System_CAPS_pubmethodGetSpatialServices(String)

Gets the spatial services for the DbProviderServices.

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_protmethodSetDbParameterValue(DbParameter, TypeUsage, Object)

Sets the parameter values for the DbProviderServices.

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbProviderServices.CreateCommandDefinition Method

 

Creates a command definition object from the specified command definition.

Namespace:   System.Data.Common
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

NameDescription
System_CAPS_pubmethodCreateCommandDefinition(DbCommand)

Creates a command definition that uses a specified command.

System_CAPS_pubmethodCreateCommandDefinition(DbCommandTree)

Creates command definition from command tree.

System_CAPS_pubmethodCreateCommandDefinition(DbProviderManifest, DbCommandTree)

Creates command definition from specified manifest andcommand tree.

Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbProviderServices.CreateCommandDefinition Method (DbCommandTree)

 

Creates command definition from command tree.

Namespace:   System.Data.Common
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

C#
public DbCommandDefinition CreateCommandDefinition(
	DbCommandTree commandTree
)

Parameters

commandTree
Type: System.Data.Common.CommandTrees.DbCommandTree

The command tree.

Return Value

Type: System.Data.Common.DbCommandDefinition

The created command definition.

.NET Framework
Available since 3.5
Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbProviderServices.CreateCommandDefinition Method (DbCommand)

 

Creates a command definition that uses a specified command.

Namespace:   System.Data.Common
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

C#
public virtual DbCommandDefinition CreateCommandDefinition(
	DbCommand prototype
)

Parameters

prototype
Type: System.Data.Common.DbCommand

The command used to create command definition.

Return Value

Type: System.Data.Common.DbCommandDefinition

The created command definition that uses a specified command.

.NET Framework
Available since 3.5
Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbProviderServices.CreateCommandDefinition Method (DbProviderManifest, DbCommandTree)

.NET Framework (current version)
 

Creates command definition from specified manifest andcommand tree.

Namespace:   System.Data.Common
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

C#
public DbCommandDefinition CreateCommandDefinition(
	DbProviderManifest providerManifest,
	DbCommandTree commandTree
)

Parameters

providerManifest
Type: System.Data.Common.DbProviderManifest

The manifest.

commandTree
Type: System.Data.Common.CommandTrees.DbCommandTree

The command tree.

Return Value

Type: System.Data.Common.DbCommandDefinition

The created command definition.

.NET Framework
Available since 4.0
Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbProviderServices.CreateDatabase Method (DbConnection, Nullable<Int32>, StoreItemCollection)

.NET Framework (current version)
 

Creates a database indicated by connection and creates schema objects.

Namespace:   System.Data.Common
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

C#
public void CreateDatabase(
	DbConnection connection,
	Nullable<int> commandTimeout,
	StoreItemCollection storeItemCollection
)

Parameters

connection
Type: System.Data.Common.DbConnection

Connection to a non-existent database that needs to be created and populated with the store objects indicated with the storeItemCollection parameter.

commandTimeout
Type: System.Nullable<Int32>

Execution timeout for any commands needed to create the database.

storeItemCollection
Type: System.Data.Metadata.Edm.StoreItemCollection

The collection of all store items based on which the script should be created.

.NET Framework
Available since 4.0
Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbProviderServices.CreateDatabaseScript Method (String, StoreItemCollection)

.NET Framework (current version)
 

Generates a data definition langauge (DDL script that creates schema objects (tables, primary keys, foreign keys) based on the contents of the StoreItemCollection parameter and targeted for the version of the database corresponding to the provider manifest token.

Namespace:   System.Data.Common
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

C#
public string CreateDatabaseScript(
                                                            string providerManifestToken,
	StoreItemCollection storeItemCollection
)

Parameters

providerManifestToken
Type: System.String

The provider manifest token identifying the target version.

storeItemCollection
Type: System.Data.Metadata.Edm.StoreItemCollection

The structure of the database.

Return Value

Type: System.String

A DDL script that creates schema objects based on the contents of the StoreItemCollection parameter and targeted for the version of the database corresponding to the provider manifest token.

.NET Framework
Available since 4.0
Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbProviderServices.CreateDbCommandDefinition Method (DbProviderManifest, DbCommandTree)

 

Creates a command definition object for the specified provider manifest and command tree.

Namespace:   System.Data.Common
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

C#
protected abstract DbCommandDefinition CreateDbCommandDefinition(
	DbProviderManifest providerManifest,
	DbCommandTree commandTree
)

Parameters

providerManifest
Type: System.Data.Common.DbProviderManifest

Provider manifest previously retrieved from the store provider.

commandTree
Type: System.Data.Common.CommandTrees.DbCommandTree

Command tree for the statement.

Return Value

Type: System.Data.Common.DbCommandDefinition

An executable command definition object.

.NET Framework
Available since 3.5
Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbProviderServices.DatabaseExists Method (DbConnection, Nullable<Int32>, StoreItemCollection)

.NET Framework (current version)
 

Returns a value indicating whether a given database exists on the server and whether schema objects contained in the storeItemCollection have been created.

Namespace:   System.Data.Common
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

C#
public bool DatabaseExists(
	DbConnection connection,
	Nullable<int> commandTimeout,
	StoreItemCollection storeItemCollection
)

Parameters

connection
Type: System.Data.Common.DbConnection

Connection to a database whose existence is verified by this method.

commandTimeout
Type: System.Nullable<Int32>

Execution timeout for any commands needed to determine the existence of the database.

storeItemCollection
Type: System.Data.Metadata.Edm.StoreItemCollection

The collection of all store items contained in the database whose existence is determined by this method.

Return Value

Type: System.Boolean

True if the provider can deduce the database only based on the connection.

.NET Framework
Available since 4.0
Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbProviderServices.DbCreateDatabase Method (DbConnection, Nullable<Int32>, StoreItemCollection)

.NET Framework (current version)
 

Creates a database indicated by connection and creates schema objects (tables, primary keys, foreign keys) based on the contents of a StoreItemCollection.

Namespace:   System.Data.Common
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

C#
protected virtual void DbCreateDatabase(
	DbConnection connection,
	Nullable<int> commandTimeout,
	StoreItemCollection storeItemCollection
)

Parameters

connection
Type: System.Data.Common.DbConnection

Connection to a non-existent database that needs to be created and populated with the store objects indicated with the storeItemCollection parameter.

commandTimeout
Type: System.Nullable<Int32>

Execution timeout for any commands needed to create the database.

storeItemCollection
Type: System.Data.Metadata.Edm.StoreItemCollection

The collection of all store items based on which the script should be created.

.NET Framework
Available since 4.0
Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbProviderServices.DbCreateDatabaseScript Method (String, StoreItemCollection)

.NET Framework (current version)
 

Generates a data definition langauge (DDL script that creates schema objects (tables, primary keys, foreign keys) based on the contents of the StoreItemCollection parameter and targeted for the version of the database corresponding to the provider manifest token.

Namespace:   System.Data.Common
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

C#
protected virtual string DbCreateDatabaseScript(
                                                            string providerManifestToken,
	StoreItemCollection storeItemCollection
)

Parameters

providerManifestToken
Type: System.String

The provider manifest token identifying the target version.

storeItemCollection
Type: System.Data.Metadata.Edm.StoreItemCollection

The structure of the database.

Return Value

Type: System.String

A DDL script that creates schema objects based on the contents of the StoreItemCollection parameter and targeted for the version of the database corresponding to the provider manifest token.

.NET Framework
Available since 4.0
Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbProviderServices.DbDatabaseExists Method (DbConnection, Nullable<Int32>, StoreItemCollection)

.NET Framework (current version)
 

Returns a value indicating whether a given database exists on the server and whether schema objects contained in the storeItemCollection have been created.

Namespace:   System.Data.Common
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

C#
protected virtual bool DbDatabaseExists(
	DbConnection connection,
	Nullable<int> commandTimeout,
	StoreItemCollection storeItemCollection
)

Parameters

connection
Type: System.Data.Common.DbConnection

Connection to a database whose existence is verified by this method.

commandTimeout
Type: System.Nullable<Int32>

Execution timeout for any commands needed to determine the existence of the database.

storeItemCollection
Type: System.Data.Metadata.Edm.StoreItemCollection

The structure of the database whose existence is determined by this method.

Return Value

Type: System.Boolean

True if the database indicated by the connection and the storeItemCollection parameter exists; otherwise, false.

.NET Framework
Available since 4.0
Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbProviderServices.DbDeleteDatabase Method (DbConnection, Nullable<Int32>, StoreItemCollection)

.NET Framework (current version)
 

Deletes all store objects specified in the store item collection from the database and the database itself.

Namespace:   System.Data.Common
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

C#
protected virtual void DbDeleteDatabase(
	DbConnection connection,
	Nullable<int> commandTimeout,
	StoreItemCollection storeItemCollection
)

Parameters

connection
Type: System.Data.Common.DbConnection

Connection to an existing database that needs to be deleted.

commandTimeout
Type: System.Nullable<Int32>

Execution timeout for any commands needed to delete the database.

storeItemCollection
Type: System.Data.Metadata.Edm.StoreItemCollection

The structure of the database to be deleted.

.NET Framework
Available since 4.0
Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbProviderServices.DbGetSpatialServices Method (String)

.NET Framework (current version)
 

Gets the spatial services for the DbProviderServices.

Namespace:   System.Data.Common
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

C#
protected virtual DbSpatialServices DbGetSpatialServices(
                                                            string manifestToken
)

Parameters

manifestToken
Type: System.String

The token information associated with the provider manifest.

Return Value

Type: System.Data.Spatial.DbSpatialServices

The spatial services.

.NET Framework
Available since 4.5
Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbProviderServices.DeleteDatabase Method (DbConnection, Nullable<Int32>, StoreItemCollection)

.NET Framework (current version)
 

Deletes all store objects specified in the store item collection from the database and the database itself.

Namespace:   System.Data.Common
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

C#
public void DeleteDatabase(
	DbConnection connection,
	Nullable<int> commandTimeout,
	StoreItemCollection storeItemCollection
)

Parameters

connection
Type: System.Data.Common.DbConnection

Connection to an existing database that needs to be deleted.

commandTimeout
Type: System.Nullable<Int32>

Execution timeout for any commands needed to delete the database.

storeItemCollection
Type: System.Data.Metadata.Edm.StoreItemCollection

The structure of the database to be deleted.

.NET Framework
Available since 4.0
Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbProviderServices.GetDbProviderManifest Method (String)

 

When overridden in a derived class, returns an instance of a class that derives from the DbProviderManifest.

Namespace:   System.Data.Common
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

C#
protected abstract DbProviderManifest GetDbProviderManifest(
                                                            string manifestToken
)

Parameters

manifestToken
Type: System.String

The token information associated with the provider manifest.

Return Value

Type: System.Data.Common.DbProviderManifest

A DbProviderManifest object that represents the provider manifest.

.NET Framework
Available since 3.5
Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbProviderServices.GetDbProviderManifestToken Method (DbConnection)

 

Returns provider manifest token given a connection.

Namespace:   System.Data.Common
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

C#
protected abstract string GetDbProviderManifestToken(
	DbConnection connection
)

Parameters

connection
Type: System.Data.Common.DbConnection

Connection to provider.

Return Value

Type: System.String

The provider manifest token for the specified connection.

.NET Framework
Available since 3.5
Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbProviderServices.GetDbSpatialDataReader Method (DbDataReader, String)

.NET Framework (current version)
 

Gets the spatial data reader for the DbProviderServices.

Namespace:   System.Data.Common
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

C#
protected virtual DbSpatialDataReader GetDbSpatialDataReader(
	DbDataReader fromReader,
                                                            string manifestToken
)

Parameters

fromReader
Type: System.Data.Common.DbDataReader

The reader where the spatial data came from.

manifestToken
Type: System.String

The token information associated with the provider manifest.

Return Value

Type: System.Data.Spatial.DbSpatialDataReader

The spatial data reader.

.NET Framework
Available since 4.5
Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbProviderServices.GetProviderFactory Method (DbConnection)

.NET Framework (current version)
 

Retrieves the DbProviderFactory based on the specified DbConnection.

Namespace:   System.Data.Common
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

C#
public static DbProviderFactory GetProviderFactory(
	DbConnection connection
)

Parameters

connection
Type: System.Data.Common.DbConnection

The connection to use.

Return Value

Type: System.Data.Common.DbProviderFactory

The retrieved DbProviderFactory.

.NET Framework
Available since 4.0
Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbProviderServices.GetProviderManifest Method (String)

 

Returns the provider manifest by using the specified version information.

Namespace:   System.Data.Common
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

C#
public DbProviderManifest GetProviderManifest(
                                                            string manifestToken
)

Parameters

manifestToken
Type: System.String

The token information associated with the provider manifest.

Return Value

Type: System.Data.Common.DbProviderManifest

The provider manifest by using the specified version information.

.NET Framework
Available since 3.5
Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbProviderServices.GetProviderManifestToken Method (DbConnection)

 

Returns provider manifest token.

Namespace:   System.Data.Common
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

C#
public string GetProviderManifestToken(
	DbConnection connection
)

Parameters

connection
Type: System.Data.Common.DbConnection

Connection to provider.

Return Value

Type: System.String

The provider manifest token.

.NET Framework
Available since 3.5
Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbProviderServices.GetProviderServices Method (DbConnection)

 

Returns providers given a connection.

Namespace:   System.Data.Common
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

C#
public static DbProviderServices GetProviderServices(
	DbConnection connection
)

Parameters

connection
Type: System.Data.Common.DbConnection

Connection to provider.

Return Value

Type: System.Data.Common.DbProviderServices

The DbProviderServices instanced based on the specified connection.

.NET Framework
Available since 3.5
Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbProviderServices.GetSpatialDataReader Method (DbDataReader, String)

.NET Framework (current version)
 

Gets the spatial data reader for the DbProviderServices.

Namespace:   System.Data.Common
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

C#
public DbSpatialDataReader GetSpatialDataReader(
	DbDataReader fromReader,
                                                            string manifestToken
)

Parameters

fromReader
Type: System.Data.Common.DbDataReader

The reader where the spatial data came from.

manifestToken
Type: System.String

The token information associated with the provider manifest.

Return Value

Type: System.Data.Spatial.DbSpatialDataReader

The spatial data reader.

.NET Framework
Available since 4.5
Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbProviderServices.GetSpatialServices Method (String)

.NET Framework (current version)
 

Gets the spatial services for the DbProviderServices.

Namespace:   System.Data.Common
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

C#
public DbSpatialServices GetSpatialServices(
                                                            string manifestToken
)

Parameters

manifestToken
Type: System.String

The token information associated with the provider manifest.

Return Value

Type: System.Data.Spatial.DbSpatialServices

The spatial services.

.NET Framework
Available since 4.5
Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbProviderServices.SetDbParameterValue Method (DbParameter, TypeUsage, Object)

.NET Framework (current version)
 

Sets the parameter values for the DbProviderServices.

Namespace:   System.Data.Common
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

C#
protected virtual void SetDbParameterValue(
	DbParameter parameter,
	TypeUsage parameterType,
                                                            object value
)

Parameters

parameter
Type: System.Data.Common.DbParameter

The parameter.

parameterType
Type: System.Data.Metadata.Edm.TypeUsage

The type of the parameter.

value
Type: System.Object

The value of the parameter.

.NET Framework
Available since 4.5
Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbProviderServices Constructor ()

 

Initializes a new instance of the DbProviderServices class.

Namespace:   System.Data.Common
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

C#
protected DbProviderServices()

.NET Framework
Available since 3.5
Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbTransaction Class

 

The base class for a transaction.

Namespace:   System.Data.Common
Assembly:  System.Data (in System.Data.dll)


C#
public abstract class DbTransaction : MarshalByRefObject, IDbTransaction, 
	IDisposable

NameDescription
System_CAPS_protmethodDbTransaction()

Initializes a new DbTransaction object.

NameDescription
System_CAPS_pubpropertyConnection

Specifies the DbConnection object associated with the transaction.

System_CAPS_protpropertyDbConnection

Specifies the DbConnection object associated with the transaction.

System_CAPS_pubpropertyIsolationLevel

Specifies the IsolationLevel for this transaction.

NameDescription
System_CAPS_pubmethodCommit()

Commits the database transaction.

System_CAPS_pubmethodCreateObjRef(Type)

Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.(Inherited from MarshalByRefObject.)

System_CAPS_pubmethodDispose()

Releases the unmanaged resources used by the DbTransaction.

System_CAPS_protmethodDispose(Boolean)

Releases the unmanaged resources used by the DbTransaction and optionally releases the managed resources.

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetLifetimeService()

Retrieves the current lifetime service object that controls the lifetime policy for this instance.(Inherited from MarshalByRefObject.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodInitializeLifetimeService()

Obtains a lifetime service object to control the lifetime policy for this instance.(Inherited from MarshalByRefObject.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone(Boolean)

Creates a shallow copy of the current MarshalByRefObject object.(Inherited from MarshalByRefObject.)

System_CAPS_pubmethodRollback()

Rolls back a transaction from a pending state.

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

NameDescription
System_CAPS_pubinterfaceSystem_CAPS_privpropertyIDbTransaction.Connection

Gets the DbConnection object associated with the transaction, or a null reference if the transaction is no longer valid.

Universal Windows Platform
Available since 10
.NET Framework
Available since 2.0

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbTransaction Methods

 

Namespace:   System.Data.Common
Assembly:  System.Data (in System.Data.dll)

NameDescription
System_CAPS_pubmethodCommit()

Commits the database transaction.

System_CAPS_pubmethodCreateObjRef(Type)

Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.(Inherited from MarshalByRefObject.)

System_CAPS_pubmethodDispose()

Releases the unmanaged resources used by the DbTransaction.

System_CAPS_protmethodDispose(Boolean)

Releases the unmanaged resources used by the DbTransaction and optionally releases the managed resources.

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetLifetimeService()

Retrieves the current lifetime service object that controls the lifetime policy for this instance.(Inherited from MarshalByRefObject.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodInitializeLifetimeService()

Obtains a lifetime service object to control the lifetime policy for this instance.(Inherited from MarshalByRefObject.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone(Boolean)

Creates a shallow copy of the current MarshalByRefObject object.(Inherited from MarshalByRefObject.)

System_CAPS_pubmethodRollback()

Rolls back a transaction from a pending state.

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbTransaction.Commit Method ()

 

Commits the database transaction.

Namespace:   System.Data.Common
Assembly:  System.Data (in System.Data.dll)

C#
public abstract void Commit()

Universal Windows Platform
Available since 10
.NET Framework
Available since 2.0
Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbTransaction.Dispose Method

 

Releases the unmanaged resources used by the DbTransaction and optionally releases the managed resources.

Namespace:   System.Data.Common
Assembly:  System.Data (in System.Data.dll)

NameDescription
System_CAPS_pubmethodDispose()

Releases the unmanaged resources used by the DbTransaction.

System_CAPS_protmethodDispose(Boolean)

Releases the unmanaged resources used by the DbTransaction and optionally releases the managed resources.

Dispose should rollback the transaction. However, the behavior of Dispose is provider specific, and should not replace calling Rollback.

Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbTransaction.Dispose Method ()

 

Releases the unmanaged resources used by the DbTransaction.

Namespace:   System.Data.Common
Assembly:  System.Data (in System.Data.dll)

C#
public void Dispose()

Dispose should rollback the transaction. However, the behavior of Dispose is provider specific, and should not replace calling Rollback.

Universal Windows Platform
Available since 10
.NET Framework
Available since 2.0
Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbTransaction.Dispose Method (Boolean)

 

Releases the unmanaged resources used by the DbTransaction and optionally releases the managed resources.

Namespace:   System.Data.Common
Assembly:  System.Data (in System.Data.dll)

C#
protected virtual void Dispose(
                                                            bool disposing
)

Parameters

disposing
Type: System.Boolean

If true, this method releases all resources held by any managed objects that this DbTransaction references.

Dispose should rollback the transaction. However, the behavior of Dispose is provider specific, and should not replace calling Rollback.

Universal Windows Platform
Available since 10
.NET Framework
Available since 2.0
Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbTransaction.MemberwiseClone Method

 

Namespace:   System.Data.Common
Assembly:  System.Data (in System.Data.dll)

NameDescription
System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone(Boolean)

Creates a shallow copy of the current MarshalByRefObject object.(Inherited from MarshalByRefObject.)

Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbTransaction.Rollback Method ()

 

Rolls back a transaction from a pending state.

Namespace:   System.Data.Common
Assembly:  System.Data (in System.Data.dll)

C#
public abstract void Rollback()

Universal Windows Platform
Available since 10
.NET Framework
Available since 2.0
Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbTransaction Properties

 

Namespace:   System.Data.Common
Assembly:  System.Data (in System.Data.dll)

NameDescription
System_CAPS_pubpropertyConnection

Specifies the DbConnection object associated with the transaction.

System_CAPS_protpropertyDbConnection

Specifies the DbConnection object associated with the transaction.

System_CAPS_pubpropertyIsolationLevel

Specifies the IsolationLevel for this transaction.

NameDescription
System_CAPS_pubinterfaceSystem_CAPS_privpropertyIDbTransaction.Connection

Gets the DbConnection object associated with the transaction, or a null reference if the transaction is no longer valid.

Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbTransaction.Connection Property

 

Specifies the DbConnection object associated with the transaction.

Namespace:   System.Data.Common
Assembly:  System.Data (in System.Data.dll)

C#
public DbConnection Connection { get; }

Property Value

Type: System.Data.Common.DbConnection

The DbConnection object associated with the transaction.

A single application may have multiple data source connections, each with zero or more transactions. This property allows you to determine the connection object associated with a particular transaction.

Universal Windows Platform
Available since 10
.NET Framework
Available since 2.0
Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbTransaction.DbConnection Property

 

Specifies the DbConnection object associated with the transaction.

Namespace:   System.Data.Common
Assembly:  System.Data (in System.Data.dll)

C#
protected abstract DbConnection DbConnection { get; }

Property Value

Type: System.Data.Common.DbConnection

The DbConnection object associated with the transaction.

A single application may have multiple data source connections, each with zero or more transactions. This property allows you to determine the connection object associated with a particular transaction.

Universal Windows Platform
Available since 10
.NET Framework
Available since 2.0
Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbTransaction.IsolationLevel Property

 

Specifies the IsolationLevel for this transaction.

Namespace:   System.Data.Common
Assembly:  System.Data (in System.Data.dll)

C#
public abstract IsolationLevel IsolationLevel { get; }

Property Value

Type: System.Data.IsolationLevel

The IsolationLevel for this transaction.

Universal Windows Platform
Available since 10
.NET Framework
Available since 2.0
Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbTransaction.IDbTransaction.Connection Property

 

Gets the DbConnection object associated with the transaction, or a null reference if the transaction is no longer valid.

Namespace:   System.Data.Common
Assembly:  System.Data (in System.Data.dll)

C#
IDbConnection IDbTransaction.Connection { get; }

Property Value

Type: System.Data.IDbConnection

The DbConnection object associated with the transaction.

.NET Framework
Available since 2.0
Return to top
© 2016 Microsoft
Export (0) Print
Expand All

DbTransaction Constructor ()

 

Initializes a new DbTransaction object.

Namespace:   System.Data.Common
Assembly:  System.Data (in System.Data.dll)

C#
protected DbTransaction()

Universal Windows Platform
Available since 10
.NET Framework
Available since 2.0
Return to top
© 2016 Microsoft